Yes in rfc822 and no in reality...
You can use Message-ID in the mail header to identify a message.
(see javax.mail.search.MessageIDTerm)
But some servers allow empty Message-IDs, then you should use a md5 algorithm.
Calculates a MD5 hash from the "From", "To", "Subject", "Date" and "Message-ID" headers and uses that as message identifier.
> Yes in rfc822 and no in reality...
>
> You can use Message-ID in the mail header to identify
> a message.
> (see javax.mail.search.MessageIDTerm)
>
> But some servers allow empty Message-IDs, then you
> should use a md5 algorithm.
> Calculates a MD5 hash from the "From", "To",
> "Subject", "Date" and "Message-ID" headers and uses
> that as message identifier.
That was helpful. Thanks,
I have been looking up a few sites. I believe that a null Message-ID header is treated as spam by some of the mail servers. Is this true?
Also any idea as to any mail servers that don't attach a Message-ID? And this header is available for both IMAP as well as POP3 protocols?
Lots of questions, so really thankful to those who can share their views.
Thanks.
Prabhu
>I have been looking up a few sites. I believe that a null Message-ID header is treated as spam by some of the mail servers. Is this true?
Yes i think, my atomic probe kill mail without Message-ID! :-)))
>Also any idea as to any mail servers that don't attach a Message-ID?
Don't know, but on 10.000 spam email only 200 don't have Message-ID!
>And this header is available for both IMAP as well as POP3 protocols?
Yes but see post bshannon, i think that will help you :
http://forum.java.sun.com/thread.jspa?forumID=43&threadID=783581