I'm trying to retrieve the messageId for the email being sent. I've tried explicitly setting the messageId just before sending, like this:
$mail->setHeader('messageId',ezcMailTools::generateMessageId('example.com'));
I then return the messageId after sending, like this:
return $mail->getHeader('messageId');
... but the counter portion of the Id is always off by one. For example, the return value will be:
... but the actual messageId will be:
Returning the messageId header value without explicitly setting it first returns a blank string. How can I retrieve this value?