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

StarLion
—
2012-12-06T14:50:56Z —
#2

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?

bghodsi
—
2012-12-06T14:54:46Z —
#3

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

StarLion
—
2012-12-06T14:59:58Z —
#4

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.

bghodsi
—
2012-12-06T15:31:44Z —
#5

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.

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.