0 votes
by (990 points)
edited

is there an internal check in StoreMessage method if the message already exist on mailserver? like an automatic update?

or do we have to check all messages, delete old one, store new one?

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (148k points)
edited
 
Best answer

No, there is no such check. It would we very complicated and error-prone, because we can't depend on MessageId because that's an optional header field, and there is no other simple check that would tell us whether the message is already there. We could search for all messages with the same Date and Subject, but then we would have to download all their data to check whether the content is the same as well, which could be a lengthy and complicated process. To make it even more complicated, some mail servers such as Microsoft Exchange have a habit of modifying both the message structure and headers, so a message you download from it is not 100% identical to the message it received.

...