|
|
|
[
Permlink
| « Hide
]
Matthew Leverton - 18/Aug/06 11:00 AM
A patch to conform to the RFC.
I've updated the priority to Major, as this still has the potential to mangle emails (e.g. broken images) in rare situations.
Further to this, I discovered that Matthew Leverton's patch still wasn't catching a few examples of lines where the leading character was a '.'. I traced it back to the fact that Zend_Mail_Transport_Abstract defines a line end as '/r/n' whereas Zend_Mime was using '/n' as a line end. Substituting $this->EOL with Zend_Mime::LINEEND did the trick - here's the diff (and will attach separately):- ===================================================================
This issue has regressed. Simon's comments on 20 Sep still apply – the "foreach(explode($this->EOL, $data) as $line) { " (now in Mail/Protocol/Smtp.php) is using self::EOL instead of Zend_Mime::LINEEND.
I'm not quite sure why this was re-opened - the updated patch applies to Zend_Mail_Transport_Smtp, but for a long time now the handling of pre-prending the dot is carried out by Zend_Mail_Protocol_Smtp, and the code in data() definitely handles the 'dot' correctly.
Zend_Mime's encodeQuotedPrintable() uses LINEND ("\n") as the line-break sequence, but Zend_Mail_Protocol_Smtp's data() method is looking for self::EOL ("\r\n") as line-breaks. Since these don't match, newlines inserted as a result of quoted-printable encoding aren't detected properly and this issue happens.
Please re-open. Further investigation of the issue by Aren Sandersen pointed to a logic error in Smtp components
Resolution committed in SVN revision 5724 - please test and confirm the issue is fixed.
Confirmed; my tests show the issue is fixed.
This also fixed my missing dot issue, but seemed to introduce a new issue. When I use setBodyHtml() and setBodyText() together to create the email, the resulting sent email only shows the text version with:
'Content-Type: text/plain; charset="iso-8859-1" displayed at the top of the received email text. The text version of the email is shown, not the html as would be expected. In addition, long email text is mangled and interspersed with various line break characters. Todd, can you please verify this behaviour occurs in release 1.0.2? If so, can you please attach new files to this issue with your code, the original message you are trying to send and - if possible - a dump of the resulting Zend_Mail object just before it is sent.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||