The EmailOptions class encapsulates various settings and parameters that can be used to control the rendering of email messages in the GroupDocs.Viewer component.
EmailOptions options = new EmailOptions();
options.setDateTimeFormat("MM d yyyy HH:mm tt");
options.setPageSize(PageSize.A4);
PdfViewOptions pdfViewOptions = new PdfViewOptions();
pdfViewOptions.setEmailOptions(options);
try (Viewer viewer = new Viewer("email.msg")) {
viewer.view(pdfViewOptions);
// Use the viewer object for further operations
}
Initializes a new instance of the EmailOptions class. This constructor is used to create a new instance of the EmailOptions class with default settings.
getDateTimeFormat()
public String getDateTimeFormat()
Gets the time format for the date and time values.
Note: The time format is specified using a pattern, such as ‘MM d yyyy HH:mm tt’. If the time format is not set, the current system format will be used. For details, see the documentation.
Returns:
java.lang.String - the time format for date and time values.
setDateTimeFormat(String dateTimeFormat)
public void setDateTimeFormat(String dateTimeFormat)
Gets the time format for the date and time values.
Note: The time format is specified using a pattern, such as ‘MM d yyyy HH:mm tt’. If the time format is not set, the current system format will be used. For details, see the documentation.
Parameters:
Parameter
Type
Description
dateTimeFormat
java.lang.String
The time format for date and time values.
getTimeZoneOffset()
public TimeZone getTimeZoneOffset()
Gets the time zone offset for the message.
Note: The time zone offset represents the time difference between the message’s time and Coordinated Universal Time (UTC). For details, see the documentation.
Returns:
java.util.TimeZone - the time zone offset.
getTimeZoneOffsetMinutes()
public int getTimeZoneOffsetMinutes()
Gets the time zone minutes offset minutes for the message.
Note: The time zone offset minutes represents the minutes difference between the message’s time and Coordinated Universal Time (UTC). For details, see the documentation.
Returns:
int - the time zone offset.
setTimeZoneOffset(TimeZone timeZoneOffset)
public void setTimeZoneOffset(TimeZone timeZoneOffset)
Gets the time zone offset for the message.
Note: The time zone offset represents the time difference between the message’s time and Coordinated Universal Time (UTC).
Parameters:
Parameter
Type
Description
timeZoneOffset
java.util.TimeZone
The time zone offset.
setTimeZoneOffset(int offsetMinutes)
public void setTimeZoneOffset(int offsetMinutes)
Gets the time zone offset minutes offset for the message.
Note: The time zone minutes offset represents the time difference between the message’s time and Coordinated Universal Time (UTC).
The mapping between email message fields and their text representations.
equals(Object o)
public boolean equals(Object o)
Overrides the equals() method of the Object class.
Parameters:
Parameter
Type
Description
o
java.lang.Object
The object to compare with.
Returns:
boolean - true if the objects are equal, false otherwise.
hashCode()
public int hashCode()
Computes the hash code value for this object. The hash code is based on the internal state of the object and is used in hash-based data structures such as hash maps and hash sets.
Note: This method overrides the default implementation of the hashCode() method defined in the Object class.
Returns:
int - the hash code value for this object.
toString()
public String toString()
Overrides the toString() method of the Object class.
Returns:
java.lang.String - a string representation of the object.
toString(ToStringStyle style)
public String toString(ToStringStyle style)
Returns a string representation of this object.
Note: This method overrides the default implementation of the toString() method defined in the Object class.
Parameters:
Parameter
Type
Description
style
org.apache.commons.lang3.builder.ToStringStyle
The ToStringStyle to use for generating the string representation.
Returns:
java.lang.String - a string representation of this object using the specified ToStringStyle.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.