Jump to content

PHP/Sendmail problem


hammer65

Recommended Posts

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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.