0 votes

I'm having an issue hopefully you would be able to help.

I'm using MS Outlook 2016. When I attach msg file via drag and drop, limilabs parses this attachment like msg(1).
But when I add new attachment by Attach File button, limilabs parses this attachment like eml(2).

Looking forward to your feedback.
Thanks.

by (310 points)
edited by

1 Answer

0 votes

[Edited]

Messages are attached in different ways to those two .msg files.

When you use drag & drop message, it is attached as a Storage (ATTACH_EMBEDDED_MSG),
when 'Attach File' button is used, it is attached a Stream (ATTACH_BY_VALUE).

In the first case there is no actual bytes of the attached message, but rather but rather many email properties (like from, to, subject, rtf data), , that allow to re-create the msg message you attached.

Mail.dll rather processes those properties and creates MIME version of the message instead of creating a .msg file.


[Previous answer]

Please examine the raw eml data you parse with Mail.dll.
You can save it to file after downloading from IMAP server:

byte[] eml = imap.GetMessageByUID(uid);
string fileName = string.Format(@"c:\email_{0}.eml", uid);
File.WriteAllBytes(fileName, eml);

I assume one of the msg files is converted by SMTP or IMAP server itself.

by (301k points)
edited by
It looks like we have some little misunderstanding. I didn't send this email. I have only saved it locally. And after that I started to parse it by Limilabs. Also, if I took this email and started to parse by Outlook Interop, an attachment with msg extension would be returned to me. Not eml. I've checked it on ms office 2013 and ms office 2016.
Without the original msg files its hard to tell why his happens.
Can you send us those two msg files (1 and 2)?
Please make the way you attach a message the only difference.

You can find the support address in the page footer.
I attached the same file in two ways to test.msg. Or you need two separate mail items?
1. https://www.dropbox.com/s/y4so8blt4oi5qwl/By%20D%26D.msg?dl=0 by d&d
2. https://www.dropbox.com/s/380yfo4ndtbw8qr/Attach%20File%20Button.msg?dl=0 using Attach File Button
Thanks, this should help.
...