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

CommentFileSizeAuthor
#1 smtp-return-path-to-sender-2371791-1.patch621 byteswebevt

Comments

webevt’s picture

StatusFileSize
new621 bytes
sgabe’s picture

Project: Mime Mail » SMTP Authentication Support

Moving to the right place.

joelpittet’s picture

Status: Active » Reviewed & tested by the community

This seems to have solved my issue! Thank you!

This may not be the best approach to the problem but it does work.

  • wundo committed 12d1b93 on 7.x-1.x authored by WebEvt
    Issue #2371791 by WebEvt: The following From address failed:...
wundo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.