Reputation: 5223
I have two users, Joe and Jill, on an email where they are both recipients in the to field. Using IMAP and their respective user oauth tokens, I poll GMail and get this email. What fields will be unique to their user and what won't, e.g. will the email's message_uid
be different for both of them or the same?
Upvotes: 0
Views: 53
Reputation: 3816
There is completely reliable way of detecting this. The usual way of dealing with this is to work on unique Message-Id
header which is supposed to be unique, but in real world, you will sooner or later came across a pair of messages which are vastly different, yet share the same Message-Id
.
Tricks like hashing the raw, undecoded message body tend to work as well (or at least until you hit a user who happens to use a mail server which changes the MIME encoding of such a message).
Upvotes: 0
Reputation: 10985
The message bodies themselves will be the same. The UID and ID will likely be different, but not necessarily. The message headers will be the same, except for possibly the Received headers.
Upvotes: 1