Author |
|
vrhovrho Newbie
Joined: 14 October 2019
Online Status: Offline Posts: 5
|
Posted: 14 October 2019 at 12:50am | IP Logged
|
|
|
Hi,
I have a parent.msg file that contains child.msg file. When I extract parent.msg file I get the child.eml attachment, which is wrong. I should get child.msg file instead.
var msgConvert = new MailBee.Outlook.MsgConvert();
msg = msgConvert.MsgToMailMessage(stream);
msg.Attachments[1].Filename; //child.eml
msg.Attachments[1].FilenameOriginal; //child.eml
Could you please help me?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 14 October 2019 at 1:41am | IP Logged
|
|
|
That's a by-design behavior. If you convert .MSG to .EML, all the .MSG files within it will be converted as well.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
vrhovrho Newbie
Joined: 14 October 2019
Online Status: Offline Posts: 5
|
Posted: 15 October 2019 at 10:47pm | IP Logged
|
|
|
Thank you for your answer. It makes sense.
Is there another way to extract files from .MSG file without converting it to .EML?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 16 October 2019 at 1:05am | IP Logged
|
|
|
No, that's the only approach currently available.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
vrhovrho Newbie
Joined: 14 October 2019
Online Status: Offline Posts: 5
|
Posted: 16 October 2019 at 4:06am | IP Logged
|
|
|
Thank you for your answer. Is it possible that you extend the MsgToMailMessage that it doesn't convert the attached .MSG files to .EML.
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 16 October 2019 at 4:35am | IP Logged
|
|
|
It actually does not convert anything. There are no MSG attachments in MSG. There are some data structures from which the MSG parser can try to build EML (or MSG). Our parser is able to build EML from these structures.
If you need MSG, you can then use MailMessageToMsg to convert that EML attachments into MSGs.
Regards,
Alex
|
Back to Top |
|
|
vrhovrho Newbie
Joined: 14 October 2019
Online Status: Offline Posts: 5
|
Posted: 16 October 2019 at 11:29pm | IP Logged
|
|
|
I would like to keep the original file format.
I have Mail.MSG file which contains two attached files child1.MSG and child2.EML.
Is it possible that parser keeps the original format of child1.MSG and child2.EML? I don't want to convert them. I just want to keep original file format (extension).
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 17 October 2019 at 6:44am | IP Logged
|
|
|
As I said, there is no original file in MSG but rather "attached message structure". Then the parser builds EML from it.
It's not like there a MSG BLOB which can be extracted as-is and saved as MSG file.
So internally we just have a bunch of properties from which we build an EML in our case. If we built an MSG, it still wouldn't have the original format.
That MSG doesn't even has any filename. child1.MSG is the name Outlook somehow "invents" by taking the message subject and appending ".msg" to it when displaying this item in the attachment list (like Outlook names attachments similar to "att0001" for untitled attachments).
If we had a way to extract the original MSG out of the containing MSG, we would have offered it. But we hadn't, sorry.
Regards,
Alex
|
Back to Top |
|
|
vrhovrho Newbie
Joined: 14 October 2019
Online Status: Offline Posts: 5
|
Posted: 20 October 2019 at 11:18pm | IP Logged
|
|
|
Thank you very much for your answer. It will help me explaining the situation to our customers.
|
Back to Top |
|
|