3rd party utility to convert Outlook MSG files to EML files [closed]

亡梦爱人 提交于 2019-12-06 04:48:20

问题


I have an application that allows people to attached files to records. Some users are uploading emails that relate to the record in question. All fine and dandy.

However some users are using MS Outlook and are uploading MSG files and other users are using thunderbird and upload EML files. Ideally I would like all users to upload EML files as they are interoperable and work on mobile devices too.

cut to the chase i'm looking to detect an uploaded MSG, either via extension or MIME type and converting to on the fly to EML instead and storing that. This is transparent to the user as Outlook can open EML files happily.

Does anyone know of a (free ideally) 3rd party commandline utility that I can call to do the conversion for me? Or is there a c# chunk of code I can use to convert an MSG to a EML?

Thanks


回答1:


You can use Redemption for that. Something like the following (off the top off my head) should work:

  RDOSession Session = new RDOSession();
  RDOMail Msg = Session.GetMessageFromMsgFile("c:\temp\YourMsgFile.msg");
  Msg.SaveAs("c:\temp\YourEmlFile.eml", rdoSaveAsType.olRFC822);


来源:https://stackoverflow.com/questions/15138803/3rd-party-utility-to-convert-outlook-msg-files-to-eml-files

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