NYCPHP Meetup

NYPHP.org

[nycphp-talk] Emails not being received when using mail()

Ken Robinson kenrbnsn at rbnsn.com
Mon Jan 14 18:59:05 EST 2008


At 06:40 PM 1/14/2008, B.A.S. wrote:

>No, the client in question doesn't have their own (dedicated) IP and 
>AFAIK the only thing available is a static IP, which I'm guessing 
>wouldn't help since (as I understand it) several domains could be 
>using the same static IP. It doesn't have an SPF record either.

Get a SPF record on the DNS Zone for the domain. A PTR record is also 
good, but the hosting company usually has to do that one.

As for the mail() function itself, use the "optional" 5th parameter 
to set the "Return-path:" header. Set it to "-f 
username at the.domain.in.question". The username doesn't have to exist. 
Some domains like AOL will throw away email where domain in the 
"Return-path:" header doesn't match the domain in the "From:" header.

Ken 




More information about the talk mailing list