Aspose::Email::MhtSaveOptions Class Reference

Allows to specify additional options when saving MailMessage to Mhtml format. More...

Inherits Aspose::Email::HeadersFormattingOptions.

Public Member Functions

int32_t get_Timeout () const
 Limits the time in milliseconds of formatting message while saving in Mht. Default value 3 sec. More...
 
void set_Timeout (int32_t value)
 Limits the time in milliseconds of formatting message while saving in Mht. Default value 3 sec. More...
 
Aspose::Email::MhtFormatOptions get_MhtFormatOptions () const
 Defines additional options when saving in MHTML format. Default value is MhtFormatOptions.WriteHeader | MhtFormatOptions.WriteOutlineAttachments. More...
 
void set_MhtFormatOptions (Aspose::Email::MhtFormatOptions value)
 Defines additional options when saving in MHTML format. Default value is MhtFormatOptions.WriteHeader | MhtFormatOptions.WriteOutlineAttachments. More...
 
bool get_PreserveOriginalBoundaries () const
 Defines whether need keep original boundaries in mail message when saving or not. More...
 
void set_PreserveOriginalBoundaries (bool value)
 Defines whether need keep original boundaries in mail message when saving or not. 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_SaveAttachments () const
 Gets a value indicating whether to save attachments. More...
 
void set_SaveAttachments (bool value)
 Sets a value indicating whether to save attachments. More...
 
bool get_PreserveOriginalDate () const
 Defines whether need keep original date in mail message when saving or not. Default value is true. More...
 
void set_PreserveOriginalDate (bool value)
 Defines whether need keep original date in mail message when saving or not. Default value is true. More...
 
bool get_SkipInlineImages () const
 Defines whether skip references on images at saving in mhtml or not. Default value is false. More...
 
void set_SkipInlineImages (bool value)
 Defines whether skip references on images at saving in mhtml or not. Default value is false. More...
 
bool get_SaveAllHeaders () const
 Defines whether need to save all headers in output mhtml or not. Default value is false. More...
 
void set_SaveAllHeaders (bool value)
 Defines whether need to save all headers in output mhtml or not. Default value is false. More...
 
System::SharedPtr< System::Collections::Generic::ListExt< System::String > > get_SavedHeaders () const
 Gets list of headers which will be present in saved mhtml content. Default value is empty list. More...
 
 MhtSaveOptions ()
 Initializes a new instance of this class that can be used to save a MailMessage in the Mhtml format. More...
 
void OnTimeoutReached (System::SharedPtr< MailMessage > msg)
 
- Public Member Functions inherited from Aspose::Email::HeadersFormattingOptions
ContactFieldsSet get_RenderedContactFields () const
 Defines groups of Contact fields which will be included in output mhtml. Default value is ContactFieldsSet.AllExisting. More...
 
void set_RenderedContactFields (ContactFieldsSet value)
 Defines groups of Contact fields which will be included in output mhtml. Default value is ContactFieldsSet.AllExisting. More...
 
System::String get_CssStyles () const
 Gets the additional css styles for the formatter. More...
 
void set_CssStyles (System::String value)
 Sets the additional css styles for the formatter. More...
 
System::String get_DefaultPageHeaderFormat ()
 Default page header format. More...
 
void set_DefaultPageHeaderFormat (System::String value)
 Default page header format. More...
 
System::String get_DefaultHeaderFormat ()
 Default header line format. More...
 
void set_DefaultHeaderFormat (System::String value)
 Default header line format. More...
 
System::String get_BeforeHeadersFormat ()
 Before headers format. More...
 
void set_BeforeHeadersFormat (System::String value)
 Before headers format. More...
 
System::String get_AfterHeadersFormat ()
 After headers format. More...
 
void set_AfterHeadersFormat (System::String value)
 After headers format. More...
 
System::SharedPtr< System::Collections::Specialized::StringDictionary > get_FormatTemplates () const
 Gets the format templates. More...
 
System::SharedPtr< System::Collections::Generic::ListExt< System::String > > get_RenderingHeaders () const
 Gets list of headers for rendering. More...
 
 HeadersFormattingOptions ()
 Initializes a new instance of this class that can be used to save a MailMessage in the Mhtml 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...
 

Public Attributes

System::EventHandler TimeoutReached
 Raised if timed out while saving to Mhtml. More...
 
- Public Attributes inherited from Aspose::Email::HeadersFormattingOptions
System::SharedPtr< System::Collections::Specialized::StringDictionary > formatTemplates
 
System::SharedPtr< System::Collections::Generic::ListExt< System::String > > renderingHeaders
 

Friends

class Aspose::Email::MailMessage
 

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...
 
- Static Public Attributes inherited from Aspose::Email::HeadersFormattingOptions
static const System::String MhtExportCss
 
- 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 Mhtml format.

The following example shows how to save MailMessage as MHTML.

[C#]

var eml = MailMessage.Load("Message.eml");
eml.Save("target.mthml", SaveOptions.DefaultMhtml);

[Visual Basic]

Dim eml = MailMessage.Load("Message.eml")
eml.Save("target.mthml", SaveOptions.DefaultMhtml)

Constructor & Destructor Documentation

◆ MhtSaveOptions()

Aspose::Email::MhtSaveOptions::MhtSaveOptions ( )

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

Member Function Documentation

◆ get_CheckBodyContentEncoding()

bool Aspose::Email::MhtSaveOptions::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 properties will be changed to default System::Text::Encoding::UTF8.

◆ get_MhtFormatOptions()

Aspose::Email::MhtFormatOptions Aspose::Email::MhtSaveOptions::get_MhtFormatOptions ( ) const

Defines additional options when saving in MHTML format. Default value is MhtFormatOptions.WriteHeader | MhtFormatOptions.WriteOutlineAttachments.

◆ get_PreserveOriginalBoundaries()

bool Aspose::Email::MhtSaveOptions::get_PreserveOriginalBoundaries ( ) const

Defines whether need keep original boundaries in mail message when saving or not.

◆ get_PreserveOriginalDate()

bool Aspose::Email::MhtSaveOptions::get_PreserveOriginalDate ( ) const

Defines whether need keep original date in mail message when saving or not. Default value is true.

◆ get_SaveAllHeaders()

bool Aspose::Email::MhtSaveOptions::get_SaveAllHeaders ( ) const

Defines whether need to save all headers in output mhtml or not. Default value is false.

◆ get_SaveAttachments()

bool Aspose::Email::MhtSaveOptions::get_SaveAttachments ( ) const

Gets a value indicating whether to save attachments.

true if attachments should be saved; otherwise, false.

◆ get_SavedHeaders()

System::SharedPtr<System::Collections::Generic::ListExt<System::String> > Aspose::Email::MhtSaveOptions::get_SavedHeaders ( ) const

Gets list of headers which will be present in saved mhtml content. Default value is empty list.

◆ get_SkipInlineImages()

bool Aspose::Email::MhtSaveOptions::get_SkipInlineImages ( ) const

Defines whether skip references on images at saving in mhtml or not. Default value is false.

◆ get_Timeout()

int32_t Aspose::Email::MhtSaveOptions::get_Timeout ( ) const

Limits the time in milliseconds of formatting message while saving in Mht. Default value 3 sec.

◆ OnTimeoutReached()

void Aspose::Email::MhtSaveOptions::OnTimeoutReached ( System::SharedPtr< MailMessage msg)

◆ set_CheckBodyContentEncoding()

void Aspose::Email::MhtSaveOptions::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 properties will be changed to default System::Text::Encoding::UTF8.

◆ set_MhtFormatOptions()

void Aspose::Email::MhtSaveOptions::set_MhtFormatOptions ( Aspose::Email::MhtFormatOptions  value)

Defines additional options when saving in MHTML format. Default value is MhtFormatOptions.WriteHeader | MhtFormatOptions.WriteOutlineAttachments.

◆ set_PreserveOriginalBoundaries()

void Aspose::Email::MhtSaveOptions::set_PreserveOriginalBoundaries ( bool  value)

Defines whether need keep original boundaries in mail message when saving or not.

◆ set_PreserveOriginalDate()

void Aspose::Email::MhtSaveOptions::set_PreserveOriginalDate ( bool  value)

Defines whether need keep original date in mail message when saving or not. Default value is true.

◆ set_SaveAllHeaders()

void Aspose::Email::MhtSaveOptions::set_SaveAllHeaders ( bool  value)

Defines whether need to save all headers in output mhtml or not. Default value is false.

◆ set_SaveAttachments()

void Aspose::Email::MhtSaveOptions::set_SaveAttachments ( bool  value)

Sets a value indicating whether to save attachments.

true if attachments should be saved; otherwise, false.

◆ set_SkipInlineImages()

void Aspose::Email::MhtSaveOptions::set_SkipInlineImages ( bool  value)

Defines whether skip references on images at saving in mhtml or not. Default value is false.

◆ set_Timeout()

void Aspose::Email::MhtSaveOptions::set_Timeout ( int32_t  value)

Limits the time in milliseconds of formatting message while saving in Mht. Default value 3 sec.

Friends And Related Function Documentation

◆ Aspose::Email::MailMessage

friend class Aspose::Email::MailMessage
friend

Member Data Documentation

◆ TimeoutReached

System::EventHandler Aspose::Email::MhtSaveOptions::TimeoutReached

Raised if timed out while saving to Mhtml.

SaveOptions()
Hides the class constructor.