0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 10:02:14 +02:00

Change content-id header formatting, see #1691, #1864

This commit is contained in:
Marcus Bointon 2019-10-20 20:51:58 +02:00
parent 9282a06c8e
commit a038b50362

View File

@ -3062,8 +3062,8 @@ class PHPMailer
}
//Only set Content-IDs on inline attachments
if ($cid !== '' && $disposition === 'inline') {
$mime[] = 'Content-ID: ' . $this->encodeHeader('<' . $this->secureHeader($cid) . '>') . static::$LE;
if ((string) $cid !== '' && $disposition === 'inline') {
$mime[] = 'Content-ID: <' . $this->encodeHeader($this->secureHeader($cid)) . '>' . static::$LE;
}
// If a filename contains any of these chars, it should be quoted,