
#Sample eml files how to#
The following code snippet shows you how to load an EML message into MailMessage and convert it to MHTML with a message date in the UTC system. Saving MailMessage as MHTMLĭifferent options of MHTML can be used to obtain the desired results. The following code snippet shows you how to Saving as MSG with Preserved Dates. The MsgSaveOptions class allows you to save the source message as an Outlook Message file (MSG) preserving dates. The following code snippet shows you how to loads an EML message and converts it to MSG using the appropriate option from SaveOptions. The following code snippet shows you how to save as EML preserving TNEF attachments. Saving as EML Preserving TNEF Attachments The following code snippet shows you how to load EML and save as EML preserving the original boundaries. Load and Save an EML message Preserving the Original Boundaries The following code snippet shows you how to load an EML message and saves it to the disc in the same format. The article shows how to use these classes to save a sample email as: The base class SaveOptions and the classes EmlSaveOptions, MsgSaveOptions, MhtSaveOptions, HtmlSaveOptions for additional settings when saving MailMessage can be used for saving messages to other formats. To demonstrate this feature, the code in this article loads three types of messages from disk and saves them back in other formats. Preserving Embedded Message Format during Loading Saving and Converting MessagesĪspose.Email makes it easy to convert any message type to another format.

The following code snippet shows you how to load a message with load options. The following code snippet shows you how to detecting file formats.

FileFormatUtil.DetectFileFormat(Stream) Method.The following classes and methods can be used to detect the loaded file format. The DetectFileFormat method of FileFormatUtil class can be used to achieve this. Loading and Saving Message Detecting File FormatsĪspose.Email API provides the capability to detect the file format of the provided message file. Saving Message as Outlook Template (.oft) file.Saving as HTML without Embedding Resources.Exporting Email to MHT with customized TimeZone.Exporting Email to MHT without Inline Images.Rendering Calendar Events while Converting to MHTML.Converting to MHTML with Optional Settings.Saving as EML Preserving TNEF Attachments.

