Aspose::Email::EmlSaveOptions Class Reference

Allows to specify additional options when saving MailMessage to Eml and Emlx format. More...

Inherits Aspose::Email::SaveOptions.

Public Member Functions

Aspose::Email::FileCompatibilityMode get_FileCompatibilityMode () const
 Defines inner conversions,that are necessarily to be done when saving a message. The default value is FileCompatibilityMode.None. More...
 
void set_FileCompatibilityMode (Aspose::Email::FileCompatibilityMode value)
 Defines inner conversions,that are necessarily to be done when saving a message. The default value is FileCompatibilityMode.None. More...
 
bool get_PreserveSignedContent () const
 Gets a value indicating whether it is necessary to save signed message without changes of content to provide correctly structure of digital sign. By default the value is false. More...
 
void set_PreserveSignedContent (bool value)
 Sets a value indicating whether it is necessary to save signed message without changes of content to provide correctly structure of digital sign. By default the value is false. More...
 
bool get_CheckBodyContentEncoding () const
 Defines whether need check message body content encoding when saving. By default the value is false. More...
 
void set_CheckBodyContentEncoding (bool value)
 Defines whether need check message body content encoding when saving. By default the value is false. More...
 
bool get_PreserveEmbeddedMessageFormat () const
 Gets a value indicating whether it is necessary to preserve MSG format of embedded message at converting to MailMessage. By default the value is false. More...
 
void set_PreserveEmbeddedMessageFormat (bool value)
 Sets a value indicating whether it is necessary to preserve MSG format of embedded message at converting to MailMessage. By default the value is false. More...
 
 EmlSaveOptions (System::SharedPtr< Aspose::Email::MailMessageSaveType > saveType)
 Initializes a new instance of this class that can be used to save a MailMessage in the Eml and Emlx 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

Allows to specify additional options when saving MailMessage to Eml and Emlx format.

The following example shows how to load and Save an EML message Preserving the embedded message format.

[C#]

MailMessage mailMessage = MailMessage.Load("source.eml");
// Save as eml with preserved embedded message format
EmlSaveOptions emlSaveOptions = new EmlSaveOptions(MailMessageSaveType.EmlFormat)
{
PreserveEmbeddedMessageFormat = true
};
mailMessage.Save("target.eml", emlSaveOptions);

[Visual Basic]

Dim mailMessage As MailMessage = MailMessage.Load("source.eml")
' Save as eml with preserved embedded message format
Dim emlSaveOptions As EmlSaveOptions = New EmlSaveOptions(MailMessageSaveType.EmlFormat) With {
.PreserveEmbeddedMessageFormat = True
}
}
mailMessage.Save("target.eml", emlSaveOptions)

Constructor & Destructor Documentation

◆ EmlSaveOptions()

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

Initializes a new instance of this class that can be used to save a MailMessage in the Eml and Emlx format.

Member Function Documentation

◆ get_CheckBodyContentEncoding()

bool Aspose::Email::EmlSaveOptions::get_CheckBodyContentEncoding ( ) const

Defines whether need check message body content encoding when saving. By default the value is false.

If true, it will be check whether the MailMessage::HtmlBody content encoding matches to the encoding specified by the MailMessage::BodyEncoding property. If the HtmlBody content encoding doesn't match BodyEncoding property, the MailMessage::BodyEncoding and MailMessage::PreferredTextEncoding will be changed to default System::Text::Encoding::UTF8.

◆ get_FileCompatibilityMode()

Aspose::Email::FileCompatibilityMode Aspose::Email::EmlSaveOptions::get_FileCompatibilityMode ( ) const

Defines inner conversions,that are necessarily to be done when saving a message. The default value is FileCompatibilityMode.None.

◆ get_PreserveEmbeddedMessageFormat()

bool Aspose::Email::EmlSaveOptions::get_PreserveEmbeddedMessageFormat ( ) const

Gets a value indicating whether it is necessary to preserve MSG format of embedded message at converting to MailMessage. By default the value is false.

Generally, embedded messages have the same format (EML or MSG) as the underlying message. By default, when converting from MSG to EML and vice versa, embedded messages are also converted to the target format. Setting the property to true preserves the original format of embedded messages.

◆ get_PreserveSignedContent()

bool Aspose::Email::EmlSaveOptions::get_PreserveSignedContent ( ) const

Gets a value indicating whether it is necessary to save signed message without changes of content to provide correctly structure of digital sign. By default the value is false.

The property is only meaningful for signed messages; it has no effect on unsigned messages. This property is intended for some complex signed messages with detached signature generated by other clients, whose implementation differences prevent Aspose.Email from exactly replicating their MIME content generation. Saving such messages without using PreserveSignedContent will cause the signature in the saved messages to fail. Some simple messages and messages with an attached signature can be saved correctly without using this property.

◆ set_CheckBodyContentEncoding()

void Aspose::Email::EmlSaveOptions::set_CheckBodyContentEncoding ( bool  value)

Defines whether need check message body content encoding when saving. By default the value is false.

If true, it will be check whether the MailMessage::HtmlBody content encoding matches to the encoding specified by the MailMessage::BodyEncoding property. If the HtmlBody content encoding doesn't match BodyEncoding property, the MailMessage::BodyEncoding and MailMessage::PreferredTextEncoding will be changed to default System::Text::Encoding::UTF8.

◆ set_FileCompatibilityMode()

void Aspose::Email::EmlSaveOptions::set_FileCompatibilityMode ( Aspose::Email::FileCompatibilityMode  value)

Defines inner conversions,that are necessarily to be done when saving a message. The default value is FileCompatibilityMode.None.

◆ set_PreserveEmbeddedMessageFormat()

void Aspose::Email::EmlSaveOptions::set_PreserveEmbeddedMessageFormat ( bool  value)

Sets a value indicating whether it is necessary to preserve MSG format of embedded message at converting to MailMessage. By default the value is false.

Generally, embedded messages have the same format (EML or MSG) as the underlying message. By default, when converting from MSG to EML and vice versa, embedded messages are also converted to the target format. Setting the property to true preserves the original format of embedded messages.

◆ set_PreserveSignedContent()

void Aspose::Email::EmlSaveOptions::set_PreserveSignedContent ( bool  value)

Sets a value indicating whether it is necessary to save signed message without changes of content to provide correctly structure of digital sign. By default the value is false.

The property is only meaningful for signed messages; it has no effect on unsigned messages. This property is intended for some complex signed messages with detached signature generated by other clients, whose implementation differences prevent Aspose.Email from exactly replicating their MIME content generation. Saving such messages without using PreserveSignedContent will cause the signature in the saved messages to fail. Some simple messages and messages with an attached signature can be saved correctly without using this property.

EmlSaveOptions(System::SharedPtr< Aspose::Email::MailMessageSaveType > saveType)
Initializes a new instance of this class that can be used to save a MailMessage in the Eml and Emlx f...