public class EmailBodyPart extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE_TEXT_HTML
The MIME type of email body part in HTML format.
|
static String |
CONTENT_TYPE_TEXT_PLAIN
The MIME type of email body part in simple text format.
|
| Constructor and Description |
|---|
EmailBodyPart(String content,
String contentType)
Constructs a new email body part.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getContent()
Gets the content of this email body part.
|
String |
getContent(Map<String,Object> properties)
Gets compiled content of this email body part using given properties.
|
String |
getContentType()
Gets the MIME type of this email body part content.
|
int |
hashCode() |
boolean |
isHtml()
Checks whether the content of this email body part has HTML format.
|
boolean |
isText()
Checks whether the content of this email body part has simple text format.
|
void |
setContent(String content)
Sets the content for this email body part.
|
void |
setContentType(String contentType)
Sets the MIME type of this email body part content.
|
String |
toString() |
public static final String CONTENT_TYPE_TEXT_PLAIN
public static final String CONTENT_TYPE_TEXT_HTML
public String getContentType()
public void setContentType(String contentType)
contentType - the string with MIME-type to set.public String getContent()
public String getContent(Map<String,Object> properties)
The result of this method will be different from result of getContent() if the content is
a template on FreeMarker template language.
properties - the map with values of variables used within content template.FreeMarkerTemplatepublic void setContent(String content)
Instead of actual string with content this method accepts path to FreeMarker Template File (*.ftl) in the resources of current RPA process module. In this case the content of the .ftl file will be used as content for this email body part.
content - the string with content to set or path to resource .ftl file with content to set.public boolean isText()
true if the content for this email body part has simple text format and
false otherwise.public boolean isHtml()
true if the content for this email body part has HTML format and false
otherwise.Copyright © 2023. All rights reserved.