EmailOptions
Inheritance: java.lang.Object
public class EmailOptions
Provides options for rendering email messages.
The EmailOptions class encapsulates various settings and parameters that can be used to control the rendering of email messages in the GroupDocs.Viewer component.
For details, see the documentation.
Example usage:
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
}
Constructors
Constructor | Description |
---|---|
EmailOptions() | Initializes a new instance of the EmailOptions class. |
Methods
Method | Description |
---|---|
getDateTimeFormat() | Gets the time format for the date and time values. |
setDateTimeFormat(String dateTimeFormat) | Gets the time format for the date and time values. |
getTimeZoneOffset() | Gets the time zone offset for the message. |
getTimeZoneOffsetMinutes() | Gets the time zone minutes offset minutes for the message. |
setTimeZoneOffset(TimeZone timeZoneOffset) | Gets the time zone offset for the message. |
setTimeZoneOffset(int offsetMinutes) | Gets the time zone offset minutes offset for the message. |
getPageSize() | Gets the size of the output page. |
setPageSize(PageSize value) | Gets the size of the output page. |
getFieldTextMap() | Retrieves the mapping between email message fields and their text representations. |
setFieldTextMap(Map<Field,String> value) | Sets the mapping between email message fields and their text representations. |
equals(Object o) | Overrides the equals() method of the Object class. |
hashCode() | {@inheritDoc} |
toString() | Overrides the toString() method of the Object class. |
toString(ToStringStyle style) | {@inheritDoc} |
EmailOptions()
public EmailOptions()
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).
Parameters:
Parameter | Type | Description |
---|---|---|
offsetMinutes | int | The time zone offset. |
getPageSize()
public final PageSize getPageSize()
Gets the size of the output page.
Returns: PageSize - the page size.
setPageSize(PageSize value)
public final void setPageSize(PageSize value)
Gets the size of the output page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | PageSize | The page size. |
getFieldTextMap()
public final Map<Field,String> getFieldTextMap()
Retrieves the mapping between email message fields and their text representations.
Returns: java.util.Map<com.groupdocs.viewer.options.Field,java.lang.String> - the mapping between email message fields and their text representations.
setFieldTextMap(Map<Field,String> value)
public final void setFieldTextMap(Map<Field,String> value)
Sets the mapping between email message fields and their text representations.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.Map<com.groupdocs.viewer.options.Field,java.lang.String> | 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.