Do you have a question? Post it now! No Registration Necessary. Now with pictures!
June 24, 2009, 12:25 pm
rate this thread
I am fetching mails from gmail and imap_fetch_overview function
returns array of message information along with message_id that is
only the unique thing to identify message identity. But for some mails
it is blank. So how can I preserve unique identity of the messages as
I am storing them in database. Please help me. Thanks in advance.
- C. (http://symcbean.blogspot.c
June 24, 2009, 1:14 pm
Re: PHP IMAP messege_id blank
Its up to the originating MTA to add a message id - but only if it
There is no requirement for a SMTP email to contain a message-id
header, indeed RFC-2821 states:
The following changes to a message being processed MAY be applied
when necessary by an originating SMTP server, or one used as the
target of SMTP as an initial posting protocol:
- Addition of a message-id field when none appears
So there's no requirement for it to be added. Nor is there any
requirement that it be unique.
Use a surrogate key. Or if you must elminate duplicate messages, a
hash of the headers and body.