EmlLoadOptions

EmlLoadOptions class

Inherits: Aspose::Email::LoadOptions

Allows to specify additional options when loading MailMessage from Eml format.

The following example shows how to convert EML to MSG.

// Initialize EmlLoadOptions
    var emlLoadOptions = new EmlLoadOptions()
       {
 PreserveTnefAttachments = true,
               PreserveEmbeddedMessageFormat = true
       };
 
 // Initialize MailMessage with EmlLoadOptions
 using (MailMessage message = MailMessage.Load("TestEml.eml", emlLoadOptions))
    {
 // Convert EML to MSG
        message.Save("output.msg", SaveOptions.DefaultMsg);
    }
' Initialize EmlLoadOptions
Dim emlLoadOptions = New EmlLoadOptions() With
{
         .PreserveTnefAttachments = True,
         .PreserveEmbeddedMessageFormat = True
   }
 
' Initialize MailMessage with EmlLoadOptions
Using message As MailMessage = MailMessage.Load("TestEml.eml", emlLoadOptions)
 ' Convert EML to MSG
    message.Save("output.msg", SaveOptions.DefaultMsg)
End Using

Constructors

NameDescription
EmlLoadOptionsInitializes a new instance of this class that can be used to loading MailMessage from Eml format.

Methods

NameDescription
get_PreserveTnefAttachmentsControls TNEF attachment loading behaviour. By default the value is false.
set_PreserveTnefAttachmentsControls TNEF attachment loading behaviour. By default the value is false.