parent
4075ba4b6b
commit
09a978fb1c
|
|
@ -816,11 +816,11 @@ class PHPMailer
|
|||
/**
|
||||
* Return the Message-ID header of the last email.
|
||||
* Technically this is the value from the last time the headers were created,
|
||||
* but it also the message ID of the last sent message except in
|
||||
* but it's also the message ID of the last sent message except in
|
||||
* pathological cases.
|
||||
* @return string
|
||||
*/
|
||||
public function GetLastMessageID()
|
||||
public function getLastMessageID()
|
||||
{
|
||||
return $this->lastMessageID;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1320,6 +1320,20 @@ EOT;
|
|||
sleep(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test setting and retrieving message ID
|
||||
*/
|
||||
public function testMessageID()
|
||||
{
|
||||
$this->Mail->Body = 'Test message ID.';
|
||||
$id = md5(12345);
|
||||
$this->Mail->MessageID = $id;
|
||||
$this->buildBody();
|
||||
$this->Mail->preSend();
|
||||
$lastid = $this->Mail->getLastMessageID();
|
||||
$this->assertEquals($lastid, $id, 'Custom Message ID mismatch');
|
||||
}
|
||||
|
||||
/**
|
||||
* Miscellaneous calls to improve test coverage and some small tests
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue