ZF-11909: Problem receiving text mail with colon characters (and the solution).
Description
Hello,
I encounter a problem sending error log by mail in text format, these mails countain files paths and the colon character seems to be problematic.
A simple example :
$mail = new Zend_Mail;
$mail ->addTo('email@domain.ext') ->setSubject('subject') ->setBodyText('C:\path\to\filename.ext') ->send();
The content sent is :
Date: Sat, 19 Nov 2011 05:32:14 +0100 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline MIME-Version: 1.0
C:\path\to\filename.ext
The ':' character carries a misinterpretation of the text body as a header, so the body of the mail isn't visible (at least in GMail and Outlook), the correct content must be :
Date: Sat, 19 Nov 2011 05:32:14 +0100 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline MIME-Version: 1.0
C=3A\path\to\filename.ext
...with a '=3A' in place of ':', I add a correction on my side in the file Zend\Mime.php at line 73 :
"\xFF","\x3A"
...and line 97 :
"=FF","=3A"
Best regards, Cédric Tailly
Comments
No comments to display