ZF-11864: Handle correct Return-Path header when sending emails via SMTP
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?