How to uniquely identify an email ?

there should be a way to identify an email ,right ?

I’ve read that is not safe as it might be left blank…

So, I want my app to check the user’s mailbox and remember what mails were opened/processed… what’s the right way to implement this ?

Thanks a lot…

Store a hash of each message?

That sounds good, Kem…

Problem is hash function returns some characters that are no good for a varchar field…

I had forgotten EncodeHex(hash, true)… It should work now… :slight_smile:

The message ID is only blank for unsent mails. I use the message ID when it’s there, a hash of the message when it’s not.

Instead, use EncodeBase64 - that’s more efficient (as it’ll be shorter).

Thanks everybody for the feedback!

One thing about Base64 is that you can’t use it where the comparison is case-insensitive since the encoding itself is case-sensitive.