[FX.php List] Sending mail from PHP?

Daniel P. Brown ogt at parasane.com
Fri Feb 24 13:19:20 MST 2006


    Bob,

    You should use:

       \r\n

    .... not just:

       \n

    Also, you don't need to place your aliased addresses in quotes.

    So your code:

    mail($mailto, $subject, $body, "From: \"from at domain.com\"
<from at domain.com\nReply-To: \"to at domain.com\"
<to at domain.com>\nX-Mailer: chfeedback.php 2.01" );

    .... should be:

    $headers  = "From: from at domain.com <from at domain.com>\r\n";
    $headers .= "Reply-To: to at domain.com <to at domain.com>\r\n";
    $headers .= "X-Mailer: chfeedback.php 2.01\r\n";
    mail($mailto,$subject,$body,$headers);

-- 
Daniel P. Brown
Chief Forensic Investigator, Founder
http://www.parasane.com/
daniel.brown at parasane.com
(724-) 513-9692



More information about the FX.php_List mailing list