Issues

ZF-11864: Handle correct Return-Path header when sending emails via SMTP

Issue Type: Patch Created: 2011-10-31T19:25:08.000+0000 Last Updated: 2011-10-31T19:44:29.000+0000 Status: Open Fix version(s): Reporter: Oleg (expolit) Assignee: Dolf Schimmel (Freeaqingme) (freak) Tags: - Zend_Mail

Related issues: Attachments:

Description

Handle correct Return-Path header when sending emails via SMTP.

When sending email via smtp to the postfix mail server. postfix replace "Return-Path: " header to the ENVELOPE FROM header.

To prevent this behavior, and outputting correct Return-Path header i wrote a simple patch.

PATCH:

Index: lib/ZendFramework/Zend/Mail/Transport/Smtp.php

--- lib/ZendFramework/Zend/Mail/Transport/Smtp.php (revision ) +++ lib/ZendFramework/Zend/Mail/Transport/Smtp.php (revision ) @@ -204,7 +204,7 @@ }

     // Set sender email address
  • $this->_connection->mail($this->_mail->getFrom()); + $this->_connection->mail($this->_mail->getReturnPath());
     // Set recipient forward paths
     foreach ($this->_mail->getRecipients() as $recipient) {

Comments

Posted by Oleg (expolit) on 2011-10-31T19:29:08.000+0000

Please, remove this patch.

This is a bad idea :(

Posted by Adam Lundrigan (adamlundrigan) on 2011-10-31T19:44:29.000+0000

Just remove the patch, or close the entire issue?

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts