Re: mail function and headers

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

 



On Wed, Mar 12, 2008 at 10:28 AM, Alain Roger <raf.news@xxxxxxxxx> wrote:
> Hi,
>
>  i'm playing a little bit with the mail function from PHP 5.2.4 and email
>  headers.
>  here is a snippet of my code:
>
>  > $headers = 'From: '.$email."< ".$fromname."
>  > >\r\n".'Reply-To:'.$email."\r\n".'X-Mailer: PHP/' . phpversion();

    You have the From: header parameters reversed.  Try this:

<?
$headers  = "From: ".$fromname." <".$email.">\r\n";
$headers .= "Reply-To: ".$email."\r\n";
$headers .= "X-Mailer: PHP/".phpversion()."\r\n";
/*
    ....
*/
?>

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

-- 
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