Merge pull request #569 from bartbutler/master

Fix base64 encoding in alt body with long lines
This commit is contained in:
Marcus Bointon 2015-11-24 08:47:59 +01:00
commit 7c8b786228
1 changed files with 3 additions and 2 deletions

View File

@ -2120,8 +2120,9 @@ class PHPMailer
$altBodyEncoding = '7bit';
$altBodyCharSet = 'us-ascii';
}
//If lines are too long, change to quoted-printable transfer encoding
if (self::hasLineLongerThanMax($this->AltBody)) {
//If lines are too long, and we're not already using an encoding that will shorten them,
//change to quoted-printable transfer encoding
if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) {
$altBodyEncoding = 'quoted-printable';
}
//Use this as a preamble in all multipart message types