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 [email protected]. 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
https://forums.phpfreaks.com/topic/34299-phpsendmail-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.