Fix extra line break in getSentMIMEMessage(), fixes #589
This commit is contained in:
parent
bf175028d2
commit
104359d993
|
|
@ -1,6 +1,7 @@
|
|||
# ChangeLog
|
||||
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -2074,7 +2074,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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1507,6 +1507,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