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

Please, remove this patch.

This is a bad idea :(

Just remove the patch, or close the entire issue?