Interface RenderableEmail
public interface RenderableEmail
A RenderableEmail is a container of the data needed for constructing and sending an email.
The body of the email can be rendered by calling one of the two rendering methods: render() and renderPlainText().
- Since:
- 3.1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the locale used when rendering this email.getModel()Returns the read-only data model of this email.Returns the subject of this email.Returns the template area where the template resource of this email is located.Returns the template resource used for rendering this email.render()Renders this email in a format determined by thetemplate resourceof this email.Renders this email as a plaintext message.
-
Method Details
-
getLocale
Locale getLocale()Returns the locale used when rendering this email.- Returns:
- the locale of this email
-
getSubject
Returns the subject of this email.- Returns:
- the subject of this email
-
getModel
Returns the read-only data model of this email.- Returns:
- the data model of this email.
-
getTemplateResource
String getTemplateResource()Returns the template resource used for rendering this email.- Returns:
- the template resource of this email
-
getTemplateArea
Returns the template area where the template resource of this email is located. If no template area has been configured for the context that this email is sentnullis returned.- Returns:
- the template area of this email, or
null
-
renderPlainText
Renders this email as a plaintext message.- Returns:
- a plaintext rendering of this email as
String - Throws:
IOException- if rendering fails
-
render
Renders this email in a format determined by thetemplate resourceof this email.- Returns:
- a rendering of this email as
String - Throws:
IOException- if rendering fails
-