Details
Description
<originally posted to fwgeneral>
Problem 1:
First the rfc states lines have a 76 character (encoded form) hard limit in length. This limit while implemented isnt working quite right. Lines regularily reach 80 chars.
This is due to the tack on of the =20 after the split (see second line) the other lines I think are over by one character but I might just be counting wrong.
IE:
man",Times,serif; color: #666; margin-bottom: 5px; line-height: 1.5em; borde=
r-bottom: 1px solid #ccc; font-size: 20px; margin-top: 10px; }=0A=09=09h2 {=20=
font-size: 14px; color: #666; margin-bottom: 10px; line-height: 1.5em; borde=
Problem 2:
= line endings, aka soft breaks.
Im not sure why, and I dont see in the RFC any explanation but my email clients all have a problem with the following line ending scenario
An encoded entity, followed by a softbreak, immediately followed by another encoded identity
Eg
=09=09US<br />=0A=09=09=09=09=09Phone #: 1<br />=0A=09=09=09=09=09=09=09=09=
=09</p>=0A=09=09=09</td>=0A=09=09=09<td style=3D"width: 50%">=0A=09=09=09=09=
This will always result in an = sign being printed on the line below Phone #:1<br />. My intutition is that if the following line begins with an identity, the soft-break = should be omitted, though I cant find anything in the rfc to back this up.
Issue Links
| This issue is related to: | ||||
| ZF-1688 | Long header lines containing non-printable characters are corrupted |
|
|
|
Update.
Chanign the line ending from \r\n to \n by itself resolves this error in a functional way. The new resultant output however, appears RFC invalid.
A temporary fix is
Index: library/Zend/Mime.php
===================================================================
— library/Zend/Mime.php (revision 918)
+++ library/Zend/Mime.php (working copy)
@@ -39,7 +39,7 @@
const DISPOSITION_ATTACHMENT = 'attachment';
const DISPOSITION_INLINE = 'inline';
const LINELENGTH = 74;
+ const LINEEND = "\n";
const MULTIPART_ALTERNATIVE = 'multipart/alternative';
const MULTIPART_MIXED = 'multipart/mixed';
const MULTIPART_RELATED = 'multipart/related';