MsgSaveOptions
Inheritance: java.lang.Object, com.aspose.email.SaveOptions
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);
Constructors
Constructor | 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. |
Methods
Method | Description |
---|---|
createSaveOptions(MailMessageSaveType saveType) | Creates a save options object of a class suitable for the specified save type. |
equals(Object arg0) | |
getClass() | |
getCustomProgressHandler() | Represents method that usually supplied by calling side and handles progress events. |
getDefaultEml() | Gets options with default values for saving message to Eml format. |
getDefaultEmlx() | Gets options with default values for saving message to Emlx format. |
getDefaultHtml() | Gets options with default values for saving message to Html format. |
getDefaultMhtml() | Gets options with default values for saving message to Mhtml format. |
getDefaultMsg() | Gets options with default values for saving message to Msg(ASCII) format. |
getDefaultMsgUnicode() | Gets options with default values for saving message to Msg(Unicode) format. |
getDefaultOft() | Gets options with default values for saving message to Outlook template (Oft) format. |
getMailMessageSaveType() | Represents the mail message save type.It can be in eml,msg(ASCII or Unicode),mhtml or html format. |
getPreserveOriginalDates() | Gets or sets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. |
getPreserveSignature() | Set to true, if signature is to be preserved. |
getSaveAsTemplate() | Set to true, if need to be saved as Outlook File Template(OFT format). |
hashCode() | |
notify() | |
notifyAll() | |
setCustomProgressHandler(ConversionProgressEventHandler value) | Represents method that usually supplied by calling side and handles progress events. |
setMailMessageSaveType(MailMessageSaveType value) | Represents the mail message save type.It can be in eml,msg(ASCII or Unicode),mhtml or html format. |
setPreserveOriginalDates(boolean value) | Gets or sets a value indicating whether it is necessary to generate new saving and modification dates when saving a message. |
setPreserveSignature(boolean value) | Set to true, if signature is to be preserved. |
setSaveAsTemplate(boolean value) | Set to true, if need to be saved as Outlook File Template(OFT format). |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
MsgSaveOptions(MailMessageSaveType saveType)
public 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.
Parameters:
Parameter | Type | Description |
---|---|---|
saveType | MailMessageSaveType |
createSaveOptions(MailMessageSaveType saveType)
public static SaveOptions createSaveOptions(MailMessageSaveType saveType)
Creates a save options object of a class suitable for the specified save type.
Parameters:
Parameter | Type | Description |
---|---|---|
saveType | MailMessageSaveType | The MailMessageSaveTypesave type (#getMailMessageSaveType.getMailMessageSaveType/#setMailMessageSaveType(MailMessageSaveType).setMailMessageSaveType(MailMessageSaveType)) for which to create a save options object. |
Returns: SaveOptions - An object of a class that derives from SaveOptions.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCustomProgressHandler()
public final ConversionProgressEventHandler getCustomProgressHandler()
Represents method that usually supplied by calling side and handles progress events.
Returns: ConversionProgressEventHandler
getDefaultEml()
public static EmlSaveOptions getDefaultEml()
Gets options with default values for saving message to Eml format.
Returns: EmlSaveOptions
getDefaultEmlx()
public static EmlSaveOptions getDefaultEmlx()
Gets options with default values for saving message to Emlx format.
Returns: EmlSaveOptions
getDefaultHtml()
public static HtmlSaveOptions getDefaultHtml()
Gets options with default values for saving message to Html format.
Returns: HtmlSaveOptions
getDefaultMhtml()
public static MhtSaveOptions getDefaultMhtml()
Gets options with default values for saving message to Mhtml format.
Returns: MhtSaveOptions
getDefaultMsg()
public static MsgSaveOptions getDefaultMsg()
Gets options with default values for saving message to Msg(ASCII) format.
Returns: MsgSaveOptions
getDefaultMsgUnicode()
public static MsgSaveOptions getDefaultMsgUnicode()
Gets options with default values for saving message to Msg(Unicode) format.
Returns: MsgSaveOptions
getDefaultOft()
public static MsgSaveOptions getDefaultOft()
Gets options with default values for saving message to Outlook template (Oft) format.
Returns: MsgSaveOptions
getMailMessageSaveType()
public final MailMessageSaveType getMailMessageSaveType()
Represents the mail message save type.It can be in eml,msg(ASCII or Unicode),mhtml or html format. The default value is Eml.
Returns: MailMessageSaveType
getPreserveOriginalDates()
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.
Returns: boolean
getPreserveSignature()
public final boolean getPreserveSignature()
Set to true, if signature is to be preserved.
Returns: boolean
getSaveAsTemplate()
public final boolean getSaveAsTemplate()
Set to true, if need to be saved as Outlook File Template(OFT format).
Returns: boolean
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setCustomProgressHandler(ConversionProgressEventHandler value)
public final void setCustomProgressHandler(ConversionProgressEventHandler value)
Represents method that usually supplied by calling side and handles progress events.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ConversionProgressEventHandler |
setMailMessageSaveType(MailMessageSaveType value)
public final void setMailMessageSaveType(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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | MailMessageSaveType |
setPreserveOriginalDates(boolean value)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setPreserveSignature(boolean value)
public final void setPreserveSignature(boolean value)
Set to true, if signature is to be preserved.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setSaveAsTemplate(boolean value)
public final void setSaveAsTemplate(boolean value)
Set to true, if need to be saved as Outlook File Template(OFT format).
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |