MsgSaveOptions

MsgSaveOptions class

Inherits: Aspose::Email::SaveOptions

This class allows the user to specify additional settings when saving a MailMessage in the Msg(ASCII) and Msg(Unicode) format.

The following example shows how to save as MSG with preserved dates.

// Initialize and Load an existing EML file by specifying the MessageFormat
var eml = MailMessage.Load("Message.eml");
 
// Save as msg with preserved dates
var msgSaveOptions = new MsgSaveOptions(MailMessageSaveType.OutlookMessageFormatUnicode)
{
    PreserveOriginalDates = true
};
 
eml.Save("outTest_out.msg", msgSaveOptions);
' Initialize and Load an existing EML file by specifying the MessageFormat
Dim eml = MailMessage.Load("Message.eml")
 
' Save as msg with preserved dates
    Dim msgSaveOptions = New MsgSaveOptions(MailMessageSaveType.OutlookMessageFormatUnicode) With {
        .PreserveOriginalDates = True
    }
 
eml.Save("outTest_out.msg", msgSaveOptions)

Constructors

NameDescription
MsgSaveOptionsInitializes a new instance of this class that can be used to save a MailMessage in the Msg(ASCII) and Msg(Unicode) format.

Methods

NameDescription
get_PreserveOriginalDatesGets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. By default the value is true, meaning the creation and modification dates will be not set to DateTime.Now.
get_PreserveSignatureSet to true, if signature is to be preserved.
get_SaveAsTemplateSet to true, if need to be saved as Outlook File Template(OFT format).
set_PreserveOriginalDatesSets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. By default the value is true, meaning the creation and modification dates will be not set to DateTime.Now.
set_PreserveSignatureSet to true, if signature is to be preserved.
set_SaveAsTemplateSet to true, if need to be saved as Outlook File Template(OFT format).