From 3d7132341659a8a201adbc3ba11b1e202ee2857c Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Sat, 27 Apr 2019 18:43:00 +0200 Subject: [PATCH] Use ; to separate multiple params in MIME headers, see #1714 & #1705 --- changelog.md | 2 ++ src/PHPMailer.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 552dbb0a..f6a25aeb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,8 @@ # PHPMailer Change Log * Add support for [RFC2387 child element content-type hint](https://tools.ietf.org/html/rfc2387#section-3.1) in `multipart/related` structures. +* Change header folding and param separation to use spaces instead of tabs +* Use ; to separate multiple MIME header params * Add support for RFC3461 DSN messages * IMAP example code fixed * Use PHP temp streams instead of temp files diff --git a/src/PHPMailer.php b/src/PHPMailer.php index cca84c31..f7f0926b 100644 --- a/src/PHPMailer.php +++ b/src/PHPMailer.php @@ -2569,7 +2569,7 @@ class PHPMailer $body .= $mimepre; $body .= $this->textLine('--' . $this->boundary[1]); $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); - $body .= $this->textLine(' boundary="' . $this->boundary[2] . '"'); + $body .= $this->textLine(' boundary="' . $this->boundary[2] . '";'); $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); $body .= static::$LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); @@ -2601,7 +2601,7 @@ class PHPMailer $body .= static::$LE; $body .= $this->textLine('--' . $this->boundary[1]); $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); - $body .= $this->textLine(' boundary="' . $this->boundary[2] . '"'); + $body .= $this->textLine(' boundary="' . $this->boundary[2] . '";'); $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); $body .= static::$LE; $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); @@ -2642,7 +2642,7 @@ class PHPMailer $body .= static::$LE; $body .= $this->textLine('--' . $this->boundary[2]); $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); - $body .= $this->textLine(' boundary="' . $this->boundary[3] . '"'); + $body .= $this->textLine(' boundary="' . $this->boundary[3] . '";'); $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); $body .= static::$LE; $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding);