ZF-11576: Quoted printable incorrectly encodes CRLF octects

Description

I started looking at Zend_Mail as a replacement for my current mailer, but ran into issues with encoding.

Take a simple test case:

$mail = new Zend_Mail(); $mail->setFrom($from); $mail->addTo($recipient); $mail->setSubject("Hello world"); $mail->setBodyHtml("Hello \r\n world. \r\n"); $mail->setBodyText("Hello \r\n world. \r\n"); $mail->send();

The output of which includes CRLF sequences encoded as =0D=0A.

--=_284d0222ac43c5a84772f5fbac1d8b6e Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable

Hello =0D=0A world. =0D=0A

RFC2045 (6.7) has this to say regards quoted printable content transfer encoding:

"Any octet, except a CR or LF that is part of a CRLF line break of the canonical (standard) form of the data being encoded, may be represented by an "=" followed by a two digit hexadecimal representation of the octet's value."

The venerable messagelint tool also flags this up as an issue (http://www.apps.ietf.org/content/message-lint):

ERROR: Encoded CRLF in quoted-printable forbidden line nn

Comments

No comments to display