Hi
It seems there's a problem in dev version of this module when it is used in conjunction with Mimemail module (7.x-1.0-beta3). I've created combined class as described in https://www.drupal.org/node/1200142, then tried to send a mail. In a result, it does not send any email and throws an error (email address is just for example):
The following From address failed:
After some debugging I found that the problem is in "<" and ">" characters in "Sender" header that is taken in smtp.mail.inc:233 from Return-Path header that is filled by Mimemail module in mimemail.inc:70. So I added the same work-around as in "case 'reply-to'" of this file, i.e.
case 'return-path':
if (strpos($value, '<') !== FALSE) {
$returnPathParts = explode('<', $value);
$returnPathAddr = rtrim($returnPathParts[1], '>');
$mailer->Sender = $returnPathAddr;
}
else {
$mailer->Sender = $value;
}
break;
.. And this fixed the problem. Patch is attached.
Regards
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | smtp-return-path-to-sender-2371791-1.patch | 621 bytes | webevt |
Comments
Comment #1
webevt commentedComment #2
sgabe commentedMoving to the right place.
Comment #3
joelpittetThis seems to have solved my issue! Thank you!
This may not be the best approach to the problem but it does work.
Comment #6
wundo commented