Merge branch '5.4' into xoauth
This commit is contained in:
commit
b380d98a17
|
|
@ -15,6 +15,7 @@ This is a major update that breaks backwards compatibility. To emphasise that th
|
|||
* `validateAddress()` is now called statically from `parseAddresses()`
|
||||
|
||||
* Fix gmail XOAUTH2 scope, thanks to @sherryl4george
|
||||
* Fix extra line break in getSentMIMEMessage()
|
||||
|
||||
## Version 5.2.14 (Nov 1st 2015)
|
||||
* Allow addresses with IDN (Internationalized Domain Name) in PHP 5.3+, thanks to @fbonzon
|
||||
|
|
|
|||
|
|
@ -2056,7 +2056,7 @@ class PHPMailer
|
|||
*/
|
||||
public function getSentMIMEMessage()
|
||||
{
|
||||
return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;
|
||||
return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -605,8 +605,8 @@ class PHPMailerTest extends \PHPUnit_Framework_TestCase
|
|||
'first.last@[IPv6::a2:a3:a4:b1:b2:b3:b4]',
|
||||
'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]',
|
||||
//This is valid RCC5322, but we don't want to allow it
|
||||
"(\r\n RCPT TO:websec02@d.mbsd.jp\r\n DATA \\\nSubject: spam10\\\n\r\n".
|
||||
" Hello,\r\n this is a spam mail.\\\n.\r\n QUIT\r\n ) a@gmail.com"
|
||||
"(\r\n RCPT TO:user@example.com\r\n DATA \\\nSubject: spam10\\\n\r\n Hello," .
|
||||
"\r\n this is a spam mail.\\\n.\r\n QUIT\r\n ) a@example.net"
|
||||
];
|
||||
// IDNs in Unicode and ASCII forms.
|
||||
$unicodeaddresses = [
|
||||
|
|
@ -1467,6 +1467,24 @@ EOT;
|
|||
$this->assertTrue((strpos($b, 'To: "Tim \"The Book\" O\'Reilly" <foo@example.com>') !== false));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test MIME structure assembly.
|
||||
*/
|
||||
public function testMIMEStructure()
|
||||
{
|
||||
$this->Mail->Subject .= ': MIME structure';
|
||||
$this->Mail->Body = '<h3>MIME structure test.</h3>';
|
||||
$this->Mail->AltBody = 'MIME structure test.';
|
||||
$this->buildBody();
|
||||
$this->Mail->preSend();
|
||||
$this->assertRegExp(
|
||||
"/Content-Transfer-Encoding: 8bit\r\n\r\n".
|
||||
"This is a multi-part message in MIME format./",
|
||||
$this->Mail->getSentMIMEMessage(),
|
||||
'MIME structure broken'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test BCC-only addressing.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue