Attached MSG files change when saved

X

xadeqd

I have this scenario- I have a .MSG email, and attached is a .JPG and
another .MSG. I want to save these attachments and generate a hash value from
the file binary. Usually not a problem, but I have encountered some strange
behavior when saving attached MSGs.

No matter how many times I save the .JPG file, the resulting file's binary
is always the same, which is great. However when I save the .MSG file the
binary is slightly different every time. Is there a way through outlook,
outlook API, or any other means, to save an attached MSG as the same binary
file that it was when it was originally attached to the MSG?

Any help appreciated
Thanks
 
D

Dmitry Streblechenko

When you attach an MSG file, Outlook is "smart" enough to convert it into an
embedded message attachment.
When you save a message as an MSG file (which is an OLe storage file), it
includes a date/time stamp. Plus teh order in which teh proeprties are
stored might be different.
The best you can do is to calculate the hash of the various message
properties (Subject, Body, etc).

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top