PHPMailer::getLastMessageID PHP Method

getLastMessageID() public method

Technically this is the value from the last time the headers were created, but it's also the message ID of the last sent message except in pathological cases.
public getLastMessageID ( ) : string
return string
    public function getLastMessageID()
    {
        return $this->lastMessageID;
    }

Usage Example

 /**
  * 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');
 }
All Usage Examples Of PHPMailer::getLastMessageID