EmlLoadOptions
Inheritance: java.lang.Object, com.aspose.email.LoadOptions
public class EmlLoadOptions extends LoadOptions
Allows to specify additional options when loading MailMessage from Eml format.
The following example shows how to convert EML to MSG.
[Java]
// Initialize EmlLoadOptions EmlLoadOptions emlLoadOptions = new EmlLoadOptions(); emlLoadOptions.setPreserveTnefAttachments(true); emlLoadOptions.setPreserveEmbeddedMessageFormat(true); // Initialize MailMessage with EmlLoadOptions try (MailMessage message = MailMessage.load("TestEml.eml", emlLoadOptions)) { // Convert EML to MSG message.save("output.msg", SaveOptions.getDefaultMsg()); }
Constructors
Constructor | Description |
---|---|
EmlLoadOptions() | Initializes a new instance of this class that can be used to loading MailMessage from Eml format. |
Methods
Method | Description |
---|---|
equals(Object arg0) | |
getClass() | |
getMessageFormat() | Represents the mail message format.It can be in eml,msg or mhtml format. |
getPreferredTextEncoding() | Gets or sets preferred encoding for message. |
getPreserveEmbeddedMessageFormat() | Gets or sets a value indicating whether it is necessary to preserve format of embedded message at loading. |
getPreserveTnefAttachments() | Controls TNEF attachment loading behaviour. |
getRemoveSignature() | Gets or sets a value indicating whether signature will be removed while loading. |
hashCode() | |
notify() | |
notifyAll() | |
setPreferredTextEncoding(Charset value) | Gets or sets preferred encoding for message. |
setPreserveEmbeddedMessageFormat(boolean value) | Gets or sets a value indicating whether it is necessary to preserve format of embedded message at loading. |
setPreserveTnefAttachments(boolean value) | Controls TNEF attachment loading behaviour. |
setRemoveSignature(boolean value) | Gets or sets a value indicating whether signature will be removed while loading. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
EmlLoadOptions()
public EmlLoadOptions()
Initializes a new instance of this class that can be used to loading MailMessage from Eml format.
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
getMessageFormat()
public final MessageFormat getMessageFormat()
Represents the mail message format.It can be in eml,msg or mhtml format. The default value is Eml.
Returns: MessageFormat
getPreferredTextEncoding()
public final Charset getPreferredTextEncoding()
Gets or sets preferred encoding for message. Forcibly sets the preferred encoding for message subject and body. The default value is null.
Returns: java.nio.charset.Charset
getPreserveEmbeddedMessageFormat()
public final boolean getPreserveEmbeddedMessageFormat()
Gets or sets a value indicating whether it is necessary to preserve format of embedded message at loading. 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 EML to MSG and vice versa, embedded messages are also converted to the target format. Setting the property to true preserves the original format of embedded messages.
Returns: boolean
getPreserveTnefAttachments()
public final boolean getPreserveTnefAttachments()
Controls TNEF attachment loading behaviour. By default the value is false.
If a message contains a TNEF attachment (winmail.dat) and has the MIME type application/ms-tnef, then this property defines whether files from TNEF will be decoded and extracted. The winmail.dat attachment remains as it is if the property value is true.
Returns: boolean
getRemoveSignature()
public final boolean getRemoveSignature()
Gets or sets a value indicating whether signature will be removed while loading.
Value: true if will be removed; otherwise, false .
Returns: boolean
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setPreferredTextEncoding(Charset value)
public final void setPreferredTextEncoding(Charset value)
Gets or sets preferred encoding for message. Forcibly sets the preferred encoding for message subject and body. The default value is null.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.nio.charset.Charset |
setPreserveEmbeddedMessageFormat(boolean value)
public final void setPreserveEmbeddedMessageFormat(boolean value)
Gets or sets a value indicating whether it is necessary to preserve format of embedded message at loading. 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 EML to MSG and vice versa, embedded messages are also converted to the target format. Setting the property to true preserves the original format of embedded messages.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setPreserveTnefAttachments(boolean value)
public final void setPreserveTnefAttachments(boolean value)
Controls TNEF attachment loading behaviour. By default the value is false.
If a message contains a TNEF attachment (winmail.dat) and has the MIME type application/ms-tnef, then this property defines whether files from TNEF will be decoded and extracted. The winmail.dat attachment remains as it is if the property value is true.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setRemoveSignature(boolean value)
public final void setRemoveSignature(boolean value)
Gets or sets a value indicating whether signature will be removed while loading.
Value: true if will be removed; otherwise, false .
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 |