views:

14

answers:

0

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:

[email protected]

... but the actual messageId will be:

[email protected]

Returning the messageId header value without explicitly setting it first returns a blank string. How can I retrieve this value?