|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-28 21:05 UTC] tony2001@php.net
[2006-11-28 21:11 UTC] sgattas at fibertel dot com dot ar
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 16:00:01 2025 UTC |
Description: ------------ Using standard imap functions to grab and store mails, I need to keep track of the Message-ID (and References and In-Reply-To) to build threads. I can successfully do it with mails sent from a lot of different accounts to my email test account but every mail sent from a gmail account does not have a Message-ID when I fetched it with a php script. I checked the same mails from my thunderbird (sent the same mail to another account and downloaded it with TB) and I verified that a Message-ID indeed exists. It seems "References" exists and lists all "Message-ID" in the thread except the one from gmail. I suspect it's due to the extension (in characters) of gmail Message-ID (it always seems larger than the other ones) Reproduce code: --------------- $mbox = imap_open("{imap.domain:143/imap}INBOX",$user,$pass); if($mbox) { $nmsg=imap_num_msg($mbox); for ($i=1; $i<=$nmsg; $i++) { $header = imap_header($mbox, $i); print_r($header); echo '<br><br>'; } } else { echo 'Connection failed<br>'; } imap_close($mbox); } Expected result: ---------------- In mails sent from a gmail account I expect to get a Message-ID in the header as defined in RFC822. Actual result: -------------- In mails sent from gmail I get a null value in Message-ID although I know that a Message-ID exists.