SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jan 2010
    Location
    Oakland,NJ
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Sending Email from one's computer

    Posted a similar message the other day with more details below:

    I have no trouble sending email on my web host server. But am curious to know if there is a way to send email to a mail server using php. So far I have had success sending but not receiving email. Apparently smtp requests are blocked by my mail server.
    Does anyone know if there is way to filter this so I can send mail on my localhost?

    I have not given up the idea as I have learned browsing the internet that some people have actually been able to so so. But when I try their scripts the same thing happens on my end.

    Bob Ghodsi

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    I'm... confused by your words.

    You say you have had success sending but not receiving email....and then say your problem is sending mail. So have you successfully sent it or not?
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Member
    Join Date
    Jan 2010
    Location
    Oakland,NJ
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php script flags no error when I send my email but the mail fails to arrive at other end. I hope I have answered your question

  4. #4
    SitePoint Member
    Join Date
    Jan 2010
    Location
    Oakland,NJ
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understand how mail server works and what your are trying to say but I have already stated that I think smtp requests are blocked by my mail server.

    Do you know if there is a way to get around this? That is my question.

    The web site you referred me to was not much help either.

    I am adding my very short php script since you requested it.

    <?php
    if(mail('bghodsi@verizon.net','Newsletter','Testing this script','From:bidjangh@gmail.com')){

    echo "All mail has been processed";
    }
    else{
    echo "Failed";
    }
    ?>

  5. #5
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    Ah okay. So you're sending it out but it's not getting to the destination. Okay, well let's see your script that's sending out the emails, most often the problem with this is the headers.

    Keep in mind that when a mail() call returns true, it doesnt mean the email was successfully sent; it just means that the email was delivered to the mail server.

    Think of it like a real mail system. mail() takes your letter, and puts it in your mailbox. It doesnt check to see if there's a stamp on it, or if you've spelt the address correctly, or anything like that. That's the job of the Postal Service.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  6. #6
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    Try putting a space between From: and the first letter of your email address.
    If SMTP is disabled on your server, you can try and use a remote mail host by connecting to it rather than using the default mail server; that said, if they're blocking the outbound traffic on your host from connecting out on the SMTP/TSL-SMTP ports, chances are you wont be able to at all. Contact your host and ask them what settings you need to use for SMTP traffic.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  7. #7
    SitePoint Member
    Join Date
    Jan 2010
    Location
    Oakland,NJ
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank for a helpful reply.

    Bob Ghodsi


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •