Re: Mail Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:

>>if(!mail($to,$subject,$msg,$headers)) { die("Unable to send"); }
>>    
>>
>
>*IF* you are using PHP5 (?) and *IF* your security settings allow it,
>the optional fifth argument will let you specify the "real" sender of
>the message, which the responder may or may not be using to bounce to.
>
>http://php.net/mail
>  
>
Richard is correct on that. The fifth argument isn't only for the
envelope sender, so ensure you include the '-f' for sendmail and compat.
wrappers.

php.net/mail: ChangeLog:
"4.0.5 The additional_parameters parameter was added."

>... which the responder may or may not be using to bounce to.
>  
>
They should *always* be sending to the envelope from address (SMTP `MAIL
FROM` command), with an empty envelope sender (SMTP `MAIL FROM:<>`) to
avoid loops.

The RFC's are a rather in depth, so here is an excerpt from Wikipedia
that pretty much sums up what the RFCs do contain:
[http://en.wikipedia.org/wiki/Bounce_message]

> The Return-Path is visible in delivered mail as header field
> Return-Path inserted by the final SMTP mail transfer agent
> <http://en.wikipedia.org/wiki/Mail_transfer_agent> (MTA), also known
> as mail delivery agent
> <http://en.wikipedia.org/wiki/Mail_delivery_agent> (MDA). The MDA
> simply copies the *reverse path* in the SMTP MAIL FROM command into
> the Return-Path. The MDA also removes bogus Return-Path header fields
> inserted by other MTAs, this header field is generally guaranteed to
> reflect the last reverse path seen in the MAIL FROM command.


Travis Doherty

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux