> Emails sent from my php scripts, using sendmail, all have a goofy
> "return-path" variable in the header.
>
> Is there a way I can correct this, or does it require a change to the
> sendmail config file that I can't get to?

You should be able to use the fifth parameter ("additional parameters")
that was added in PHP 4.0.5 to properly set the envelope-sender, which
will cause the 'Return-Path' header to be set properly.  Quick example:

<?
$to = 'You <[EMAIL PROTECTED]>';
$from = '[EMAIL PROTECTED]';
$subject = 'hey!';
$message = 'This is the message.';
mail($to, $subject, $message, "From: $from", "-f$from");
?>

Note that this doesn't do error checking on the status of the mail()
command -- it's just a quick example.  There also may be sendmail config
things that prevent you from setting the Return-Path in this manner;
that's out of my area of expertise, so if the above doesn't work, I'm
not much more help...

Joel

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


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

Reply via email to