|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-05-31 19:36 UTC] mad at dactar dot ch
Description:
------------
Message_id retrived by imap_headerinfo is empty when mail is local. Message_id retrived by Thunderbird for exemple is correct event if mail is local.
Reproduce code:
---------------
Very simple code :
$mbox=imap_open($MAILSERVER,
$PHP_AUTH_USER,
$PHP_AUTH_PW);
$header=imap_headerinfo($mbox,
$num,
80,80);
echo "Message_ID : $header->message_id<br>";
Expected result:
----------------
Always see the Message_id if it is set on the mail server.
Actual result:
--------------
Message_id's content is lost when we use PHP/imap and if the mail is local. There's no problem with mails from outside.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
I found out what goes wrong. When echo strstr($msgid,1,$msgidlen-1), the result is normal. Those 20% email sent by outlook, the message id looks like this: <xxxxxxx@yyyyy.com> (html tag). Other mail client message id looks similar but imap_headerinfo will change '<' to '<' and '>' to '>' automatically. $msgid = str_replace('<','',$msgid); $msgid = str_replace('>','',$msgid); echo $msgid; then the echo result is normal.