public class EmlSaveOptions extends SaveOptions
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.
[Java]
MailMessage mailMessage = MailMessage.load("source.eml"); // Save as eml with preserved embedded message format EmlSaveOptions emlSaveOptions = new EmlSaveOptions(MailMessageSaveType.getEmlFormat()) emlSaveOptions.setPreserveEmbeddedMessageFormat(true); mailMessage.save("target.eml", emlSaveOptions);
| Constructor and Description |
|---|
EmlSaveOptions(MailMessageSaveType saveType)
Initializes a new instance of this class that can be used to save a MailMessage in the Eml and Emlx format.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getCheckBodyContentEncoding()
Defines whether need check message body content encoding when saving.
|
int |
getFileCompatibilityMode()
Defines inner conversions,that are necessarily to be done when saving a message.
|
boolean |
getPreserveEmbeddedMessageFormat()
Gets or sets a value indicating whether it is necessary to preserve MSG format of
embedded message at converting to MailMessage.
|
boolean |
getPreserveSignedContent()
Gets or sets a value indicating whether it is necessary to save signed message
without changes of content to provide correctly structure of digital sign.
|
void |
setCheckBodyContentEncoding(boolean value)
Defines whether need check message body content encoding when saving.
|
void |
setFileCompatibilityMode(int value)
Defines inner conversions,that are necessarily to be done when saving a message.
|
void |
setPreserveEmbeddedMessageFormat(boolean value)
Gets or sets a value indicating whether it is necessary to preserve MSG format of
embedded message at converting to MailMessage.
|
void |
setPreserveSignedContent(boolean value)
Gets or sets a value indicating whether it is necessary to save signed message
without changes of content to provide correctly structure of digital sign.
|
createSaveOptions, getCustomProgressHandler, getDefaultEml, getDefaultEmlx, getDefaultHtml, getDefaultMhtml, getDefaultMsg, getDefaultMsgUnicode, getDefaultOft, getMailMessageSaveType, setCustomProgressHandler, setMailMessageSaveTypepublic EmlSaveOptions(MailMessageSaveType saveType)
Initializes a new instance of this class that can be used to save a MailMessage in the Eml and Emlx format.
public final int getFileCompatibilityMode()
Defines inner conversions,that are necessarily to be done when saving a message. The default value is FileCompatibilityMode.None.
public final void setFileCompatibilityMode(int value)
Defines inner conversions,that are necessarily to be done when saving a message. The default value is FileCompatibilityMode.None.
public final boolean getPreserveSignedContent()
Gets or 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.
public final void setPreserveSignedContent(boolean value)
Gets or 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.
public final boolean getCheckBodyContentEncoding()
Defines whether need check message body content encoding when saving. By default the value is false.
MailMessage.HtmlBody(MailMessage.getHtmlBody()/MailMessage.setHtmlBody(String)) content encoding matches
to the encoding specified by the MailMessage.BodyEncoding(MailMessage.getBodyEncoding()/MailMessage#setBodyEncoding(Encoding)) property.
If the HtmlBody content encoding doesn't match BodyEncoding property,
the MailMessage.BodyEncoding(MailMessage.getBodyEncoding()/MailMessage#setBodyEncoding(Encoding)) and MailMessage.PreferredTextEncoding(MailMessage.getPreferredTextEncoding()/MailMessage#setPreferredTextEncoding(Encoding)) will be changed to default System.Text.Encoding.UTF8(java.nio.charset.Charset#getUTF8).
public final void setCheckBodyContentEncoding(boolean value)
Defines whether need check message body content encoding when saving. By default the value is false.
MailMessage.HtmlBody(MailMessage.getHtmlBody()/MailMessage.setHtmlBody(String)) content encoding matches
to the encoding specified by the MailMessage.BodyEncoding(MailMessage.getBodyEncoding()/MailMessage#setBodyEncoding(Encoding)) property.
If the HtmlBody content encoding doesn't match BodyEncoding property,
the MailMessage.BodyEncoding(MailMessage.getBodyEncoding()/MailMessage#setBodyEncoding(Encoding)) and MailMessage.PreferredTextEncoding(MailMessage.getPreferredTextEncoding()/MailMessage#setPreferredTextEncoding(Encoding)) will be changed to default System.Text.Encoding.UTF8(java.nio.charset.Charset#getUTF8).
public final boolean getPreserveEmbeddedMessageFormat()
Gets or 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.
public final void setPreserveEmbeddedMessageFormat(boolean value)
Gets or 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.
Copyright (c) 2008-2024 Aspose Pty Ltd. All Rights Reserved.