From: Tim Düsterhus Date: Thu, 2 Jun 2016 22:01:39 +0000 (+0200) Subject: Force CRLF in quoted-printable mime parts X-Git-Tag: 3.0.0_Beta_1~916^2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a578bbfca5d98e204b90a05b52f89da4c615c1c;p=GitHub%2FWoltLab%2FWCF.git Force CRLF in quoted-printable mime parts --- 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()));