I found this message <http://zend-framework-community.634137.n4.nabble.com/when-I-SetReturnPath-in-zend-framework-1-11-my-email-has-2-return-path-headers-td4658703.html;cid=1433279714172-164> which says "This post has NOT been accepted by the mailing list yet." so I figured I better start a new thread.I've had reports of errors from users where servers fail to accept a message when the Return-Path header is already set. (Then why call mail->setReturnPath() at all you ask? Zend_Mail v1 overrides the 'From' email with this value for MAIL-FROM in the envelope, allowing a different email for the message Sender header)According to RFC 5321 <http://tools.ietf.org/html/rfc5321#section-4.4> , MUA's should not set Return-Path headers in the SMTP message: "A message-originating SMTP system SHOULD NOT send a message that already contains a Return-path header field."I fixed this by removing this line in setReturnPath($email) of class Zend_Mail (Zend/Mail.php) : $this->_storeHeader('Return-Path', $email, false);The Gmail MSA/MTA (and possibly others) always appends their own Return-Path regardless of what Zend does resulting in a duplicate header :Return-Path: <[email protected]>Return-Path: [email protected] I breaking something in Zend with my change? I believe it's correct.
-- View this message in context: http://zend-framework-community.634137.n4.nabble.com/when-I-SetReturnPath-in-zend-framework-v1-my-email-has-2-return-path-headers-tp4662552.html Sent from the Zend Framework mailing list archive at Nabble.com.
