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

Merge branch 'master' into 6.0

# Conflicts:
#	src/PHPMailer.php
This commit is contained in:
Marcus Bointon 2016-10-05 18:36:21 +02:00
commit 90532789b6
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
2 changed files with 18 additions and 0 deletions

13
.gitattributes vendored Normal file
View File

@ -0,0 +1,13 @@
* text=auto
/docs export-ignore
/examples export-ignore
/test export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/travis.phpunit.xml.dist export-ignore
/SECURITY.md export-ignore
/changelog.md export-ignore
/README.md export-ignore

View File

@ -201,6 +201,9 @@ class PHPMailer
/**
* An ID to be used in the Message-ID header.
* If empty, a unique id will be generated.
* You can set your own, but it must be in the format "<id@domain>",
* as defined in RFC5322 section 3.6.4 or it will be ignored.
* @see https://tools.ietf.org/html/rfc5322#section-3.6.4
*
* @var string
*/
@ -2068,6 +2071,8 @@ class PHPMailer
$result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
}
// Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
// https://tools.ietf.org/html/rfc5322#section-3.6.4
if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) {
$this->lastMessageID = $this->MessageID;
} else {