Difference between a .msg file and a .eml file

喜你入骨 提交于 2019-12-17 18:37:02

问题


What are the difference between a .msg file and a .eml file?

  1. I know that eml is infact a text file while msg is not.
  2. Both can be opened in Outlook.
  3. Outlook allows you to save the email as .msg but I didnt find an option to save as an eml

Is there anything that msg is capable and which eml is not and vice versa?


回答1:


MSG is a binary OLE storage file (IStorage). Unlike MIME (EML), it stores all MAPI specific properties that MIME cannot store. It's format is documented by Microsoft. You can look inside an MSG file on the IStorage level using a utility like SSViewer. On the MAPI level, you can open/create an MSG file using StgOpenStorage / StgCreateStorageEx and OpenIMsgOnIStg functions.

EML files are text files in the MIME format (you can open a file like that in Notepad).

To create an EML file, you can either

  1. Create it explicitly in your code one MIME header/part at a time.

  2. If you are using Extended MAPI in C++ or Delphi, you can use the IConverterSession interface that wraps the native Outlook converter. You can play with it in OutlookSpy - click IConverterSession button on the OutlookSpy toolbar.

  3. You can use Redemption and its RDOMail.SaveAs(..., olRfc822) / SafeMailItem.SaveAs(..., olRfc822) methods.



来源:https://stackoverflow.com/questions/16229591/difference-between-a-msg-file-and-a-eml-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!