I believe that there should be no space after the "-f" flag when using sendmail. This will cause issues on some servers causing emails not to be sent.
usage: sendmail [-f] [-t] [-s] [-p
] [-T] [-v] [address ...]
-----
if (isset($message['Return-Path']) && !ini_get('safe_mode')) {
$mail_result = mail(
$message['to'],
$mail_subject,
$mail_body,
$mail_headers,
// Pass the Return-Path via sendmail's -f command.
'-f ' . $message['Return-Path']
);
}
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | DefaultMailSystem-remove_space_before_return_path-1057954-5.patch | 930 bytes | pillarsdotnet |
| #1 | 1057954.patch | 463 bytes | bfroehle |
Comments
Comment #1
bfroehle commentedOriginated in #131737: Ensure that the Return-Path is set when sending mail on both Windows and non-Windows systems..
The lack of space between -f and the email address is consistent with Drupal contributed modules like returnpath. (See returnpath.module, for example).
It is not consistent with other programs like phpMailer as sun points out in #131737-25: Ensure that the Return-Path is set when sending mail on both Windows and non-Windows systems..
I have not thoroughly tested this.
Comment #2
AndrewEchidna commentedSorry, this is the first issue I've ever identified. - do I have to do anything with this?
Comment #3
bfroehle commentedandrewchidna: It'd probably be nice to know what operating system, php version, sendmail version, etc you are using. Whether things work with and without the space after the -f, etc.
Comment #4
AndrewEchidna commentedAfter the space is removed, the mail function works correctly.
PHP Version 5.2.14
This is all I could get from phpinfo as I don't manage the server. Sorry.
Comment #5
pillarsdotnet commentedBumping, re-rolling, and tagging as per standard policy.
Comment #6
bfroehle commentedAnd tagging, maybe?
Comment #7
pillarsdotnet commented#5: DefaultMailSystem-remove_space_before_return_path-1057954-5.patch queued for re-testing.
Comment #8
star-szrWhat else (if anything) needs to be done here, in order to get this into the next D7 release?
Comment #9
pillarsdotnet commented@#8: This issue needs to be reviewed by a senior Drupal developer and the status upgraded from needs review to reviewed and tested by the community.
Then it needs to sit in limbo until webchick or Dries work through the 200+ issues ahead of it in the queue.
Comment #10
pillarsdotnet commented#5: DefaultMailSystem-remove_space_before_return_path-1057954-5.patch queued for re-testing.
Comment #11
pillarsdotnet commented#5: DefaultMailSystem-remove_space_before_return_path-1057954-5.patch queued for re-testing.
Comment #12
pillarsdotnet commented#5: DefaultMailSystem-remove_space_before_return_path-1057954-5.patch queued for re-testing.
Comment #13
star-szrFixed in Drupal 7.12 - #131737: Ensure that the Return-Path is set when sending mail on both Windows and non-Windows systems.