switch ($this->body->getContentTransferEncoding()) {
case 'quoted-printable':
- return quoted_printable_encode($this->body->getContent());
+ return quoted_printable_encode(str_replace("\n", "\r\n", StringUtil::unifyNewlines($this->body->getContent())));
break;
case 'base64':
return chunk_split(base64_encode($this->body->getContent()));
$content .= "\r\n";
switch ($part->getContentTransferEncoding()) {
case 'quoted-printable':
- $content .= quoted_printable_encode($part->getContent());
+ $content .= quoted_printable_encode(str_replace("\n", "\r\n", StringUtil::unifyNewlines($part->getContent())));
break;
case 'base64':
$content .= chunk_split(base64_encode($part->getContent()));