public class MsgSaveOptions extends 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.
[Java]
// Initialize and Load an existing EML file by specifying the MessageFormat MailMessage eml = MailMessage.load("Message.eml"); // Save as msg with preserved dates MsgSaveOptions msgSaveOptions = new MsgSaveOptions(MailMessageSaveType.getOutlookMessageFormatUnicode()) msgSaveOptions.setPreserveOriginalDates(true); eml.save("outTest_out.msg", msgSaveOptions);
| Constructor and Description |
|---|
MsgSaveOptions(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.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getPreserveOriginalDates()
Gets or sets a value indicating whether it is necessary to generate
new saving and modification dates when saving a message.
|
boolean |
getPreserveSignature()
Deprecated.
Now the signature is preserved by default.This property is obsolete, not used in code and will be removed soon.
|
boolean |
getSaveAsTemplate()
Deprecated.
Please, use constructor new MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormat) or SaveOptions.DefaultOft property
|
void |
setPreserveOriginalDates(boolean value)
Gets or sets a value indicating whether it is necessary to generate
new saving and modification dates when saving a message.
|
void |
setPreserveSignature(boolean value)
Deprecated.
Now the signature is preserved by default.This property is obsolete, not used in code and will be removed soon.
|
void |
setSaveAsTemplate(boolean value)
Deprecated.
Please, use constructor new MsgSaveOptions(MailMessageSaveType.OutlookTemplateFormat) or SaveOptions.DefaultOft property
|
createSaveOptions, getCustomProgressHandler, getDefaultEml, getDefaultEmlx, getDefaultHtml, getDefaultMhtml, getDefaultMsg, getDefaultMsgUnicode, getDefaultOft, getMailMessageSaveType, setCustomProgressHandler, setMailMessageSaveTypepublic MsgSaveOptions(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.
public final boolean getPreserveOriginalDates()
Gets or sets 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.
public final void setPreserveOriginalDates(boolean value)
Gets or sets 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.
@Deprecated public final boolean getPreserveSignature()
Set to true, if signature is to be preserved.
@Deprecated public final void setPreserveSignature(boolean value)
Set to true, if signature is to be preserved.
@Deprecated public final boolean getSaveAsTemplate()
Set to true, if need to be saved as Outlook File Template(OFT format).
@Deprecated public final void setSaveAsTemplate(boolean value)
Set to true, if need to be saved as Outlook File Template(OFT format).
Copyright (c) 2008-2024 Aspose Pty Ltd. All Rights Reserved.