From 3a578bbfca5d98e204b90a05b52f89da4c615c1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 3 Jun 2016 00:01:39 +0200 Subject: [PATCH] Force CRLF in quoted-printable mime parts --- wcfsetup/install/files/lib/system/email/Email.class.php | 2 +- .../lib/system/email/mime/AbstractMultipartMimePart.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/email/Email.class.php b/wcfsetup/install/files/lib/system/email/Email.class.php index 9178af0c27..2d8b382215 100644 --- a/wcfsetup/install/files/lib/system/email/Email.class.php +++ b/wcfsetup/install/files/lib/system/email/Email.class.php @@ -450,7 +450,7 @@ class Email { 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())); diff --git a/wcfsetup/install/files/lib/system/email/mime/AbstractMultipartMimePart.class.php b/wcfsetup/install/files/lib/system/email/mime/AbstractMultipartMimePart.class.php index 3abf8bee66..4e806e52e2 100644 --- a/wcfsetup/install/files/lib/system/email/mime/AbstractMultipartMimePart.class.php +++ b/wcfsetup/install/files/lib/system/email/mime/AbstractMultipartMimePart.class.php @@ -76,7 +76,7 @@ abstract class AbstractMultipartMimePart extends AbstractMimePart implements IRe $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())); -- 2.20.1