Retrieve messageId of email being sent using ezcomponents ezcMailComposer
Posted
by Ian
on Stack Overflow
See other posts from Stack Overflow
or by Ian
Published on 2010-03-19T05:32:29Z
Indexed on
2010/03/19
5:41 UTC
Read the original article
Hit count: 220
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?
© Stack Overflow or respective owner