Aspose::Email::MsgSaveOptions Class Reference

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

Inherits Aspose::Email::SaveOptions.

Public Member Functions

bool get_PreserveOriginalDates () const
 Gets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. By default the value is false, meaning the creation and modification dates will be set to DateTime.Now. More...
 
void set_PreserveOriginalDates (bool value)
 Sets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. By default the value is false, meaning the creation and modification dates will be set to DateTime.Now. More...
 
bool get_PreserveSignature () const
 Set to true, if signature is to be preserved. More...
 
void set_PreserveSignature (bool value)
 Set to true, if signature is to be preserved. More...
 
bool get_SaveAsTemplate () const
 Set to true, if need to be saved as Outlook File Template(OFT format). More...
 
void set_SaveAsTemplate (bool value)
 Set to true, if need to be saved as Outlook File Template(OFT format). More...
 
 MsgSaveOptions (System::SharedPtr< Aspose::Email::MailMessageSaveType > saveType)
 Initializes a new instance of this class that can be used to save a MailMessage in the Msg(ASCII) and Msg(Unicode) format. More...
 
- Public Member Functions inherited from Aspose::Email::SaveOptions
ConversionProgressEventHandler get_CustomProgressHandler () const
 Represents method that usually supplied by calling side and handles progress events. More...
 
void set_CustomProgressHandler (ConversionProgressEventHandler value)
 Represents method that usually supplied by calling side and handles progress events. More...
 
System::SharedPtr< Aspose::Email::MailMessageSaveTypeget_MailMessageSaveType () const
 Represents the mail message save type.It can be in eml,msg(ASCII or Unicode),mhtml or html format. The default value is Eml. More...
 
void set_MailMessageSaveType (System::SharedPtr< Aspose::Email::MailMessageSaveType > value)
 Represents the mail message save type.It can be in eml,msg(ASCII or Unicode),mhtml or html format. The default value is Eml. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Aspose::Email::SaveOptions
static System::SharedPtr< EmlSaveOptionsget_DefaultEml ()
 Gets options with default values for saving message to Eml format. More...
 
static System::SharedPtr< EmlSaveOptionsget_DefaultEmlx ()
 Gets options with default values for saving message to Emlx format. More...
 
static System::SharedPtr< MsgSaveOptionsget_DefaultMsg ()
 Gets options with default values for saving message to Msg(ASCII) format. More...
 
static System::SharedPtr< MsgSaveOptionsget_DefaultMsgUnicode ()
 Gets options with default values for saving message to Msg(Unicode) format. More...
 
static System::SharedPtr< MsgSaveOptionsget_DefaultOft ()
 Gets options with default values for saving message to Outlook template (Oft) format. More...
 
static System::SharedPtr< MhtSaveOptionsget_DefaultMhtml ()
 Gets options with default values for saving message to Mhtml format. More...
 
static System::SharedPtr< HtmlSaveOptionsget_DefaultHtml ()
 Gets options with default values for saving message to Html format. More...
 
static System::SharedPtr< SaveOptionsCreateSaveOptions (System::SharedPtr< Aspose::Email::MailMessageSaveType > saveType)
 Creates a save options object of a class suitable for the specified save type. More...
 
- Protected Member Functions inherited from Aspose::Email::SaveOptions
 SaveOptions ()
 Hides the class constructor. More...
 

Detailed Description

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.

[C#]

// 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);

[Visual Basic]

' 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)

Constructor & Destructor Documentation

◆ MsgSaveOptions()

Aspose::Email::MsgSaveOptions::MsgSaveOptions ( System::SharedPtr< Aspose::Email::MailMessageSaveType saveType)

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

Member Function Documentation

◆ get_PreserveOriginalDates()

bool Aspose::Email::MsgSaveOptions::get_PreserveOriginalDates ( ) const

Gets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. By default the value is false, meaning the creation and modification dates will be set to DateTime.Now.

◆ get_PreserveSignature()

bool Aspose::Email::MsgSaveOptions::get_PreserveSignature ( ) const

Set to true, if signature is to be preserved.

Deprecated:
Now the signature is preserved by default.This property is obsolete, not used in code and will be removed soon.

◆ get_SaveAsTemplate()

bool Aspose::Email::MsgSaveOptions::get_SaveAsTemplate ( ) const

Set to true, if need to be saved as Outlook File Template(OFT format).

Deprecated:
Please, use constructor new MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormat) or SaveOptions.DefaultOft property

◆ set_PreserveOriginalDates()

void Aspose::Email::MsgSaveOptions::set_PreserveOriginalDates ( bool  value)

Sets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. By default the value is false, meaning the creation and modification dates will be set to DateTime.Now.

◆ set_PreserveSignature()

void Aspose::Email::MsgSaveOptions::set_PreserveSignature ( bool  value)

Set to true, if signature is to be preserved.

Deprecated:
Now the signature is preserved by default.This property is obsolete, not used in code and will be removed soon.

◆ set_SaveAsTemplate()

void Aspose::Email::MsgSaveOptions::set_SaveAsTemplate ( bool  value)

Set to true, if need to be saved as Outlook File Template(OFT format).

Deprecated:
Please, use constructor new MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormat) or SaveOptions.DefaultOft property
MsgSaveOptions(System::SharedPtr< Aspose::Email::MailMessageSaveType > saveType)
Initializes a new instance of this class that can be used to save a MailMessage in the Msg(ASCII) and...