hammer65 Posted January 15, 2007 Share Posted January 15, 2007 I am trying to send email from a PHP script. I have tried using PHPMailer used with the mailer set to use the PHP mail function, and to use Sendmail directly, and I have used mail() on it's own. In all cases, the return-path is reset from the email I specify by setting a return-path header, to apache@theseverdomain.com. I can set the -f command option to fix the problem, but I would prefer not to have to do this, but instead just specify the header. I believe that the rule in the Sendmail.cf that is causing this, is [code]H?P?Return-Path: <$g>[/code]The explanation I found for this doesn't make complete sense to me. [quote] This line defines a field called Return-Path: that displays the contents of the $g macro (sender address relative to the receiver). The ?P? portion indicates that this line is only used if the mailer uses the P flag (the mailer requires a Return-Path line).[/quote]Does somebody know, how I can get Sendmail to stop re-writing this header, so I can set it the way I want to? Is it safe to just comment out that line? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.