none
Save Outlook MailItem as .eml File with out third party software RRS feed

  • Question

  • I want to save the Outlook mail Item in the format of eml But i don't want to use any third party software's to do this can you please suggest me to do this in simply c# code 

    thank you 

    Wednesday, July 24, 2019 9:12 AM

All replies

  • The Outlook object model doesn't provide anything for that. But you may find the Save Mail in MIME format (*.eml) in Outlook Add-In page where three different ways are described:

    1. Create MIME file explicitly in your code one property at a time. You can also use existing MIME converters (for example, Lumisoft) - but they won't convert Outlook messages in a single call; you will need to expliiclty build all the headers and MIME parts.

    2. Use IConverterSession object - this is the same MIME converter used by Outlook. You can play with it in OutlookSpy (click IConverterSession button). Or just take a look at the MFCMAPI source code.

    3. Use Redemption and its RDOMail.SaveAs or SafeMailItem.SaveAs methods - it can save in the MIME format (olRfc822) along with a dozen or so other formats. It uses IConverterSessionobject when it is available (Outlook 2003 and up) or its own converter for an older version of Outlook or when used against the Exchange version of MAPI.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, July 24, 2019 10:25 PM