从 phpmailer 检索 $MessageID
retrieve $MessageID from phpmailer
我刚刚设置了 phpmailer,我想在发送时将邮件存储在日志中 table。
phpmailer 会自动创建一个 messageid,我如何检索 $MessageID 以便将其存储在我的 table 中?
我不需要设置它,但我试过了...
$MID = time() .'-' . md5('xxx@gmail.com' . 'yyy@gmail.com') . '@domain.com';
$mail->MessageID = $MID;
和发送邮件上的header不同
只要取回默认的就很高兴
有一种方法getLastMessageID您可以使用。
怎么样?你必须记住,
the structure of MessageID should be:
<sometext@sometext>
If your MessageID doesn't have this exact structure - PHPMailer will
ignore your MessageId and generate it's own MessageId.
我刚刚设置了 phpmailer,我想在发送时将邮件存储在日志中 table。
phpmailer 会自动创建一个 messageid,我如何检索 $MessageID 以便将其存储在我的 table 中?
我不需要设置它,但我试过了...
$MID = time() .'-' . md5('xxx@gmail.com' . 'yyy@gmail.com') . '@domain.com';
$mail->MessageID = $MID;
和发送邮件上的header不同
只要取回默认的就很高兴
有一种方法getLastMessageID您可以使用。
the structure of MessageID should be:
<sometext@sometext>
If your MessageID doesn't have this exact structure - PHPMailer will ignore your MessageId and generate it's own MessageId.