public class TemplatedOutgoingMessage extends DefaultOutgoingMessage
DefaultOutgoingMessage.
The template will be created using the Apache Velocity Project.
| Modifier and Type | Class and Description |
|---|---|
static class |
TemplatedOutgoingMessage.TemplatedMessageBuilder
Builder of this class.
|
DefaultOutgoingMessage.Builder| Constructor and Description |
|---|
TemplatedOutgoingMessage(String subject,
String pathToTemplate,
Map<String,Object> params,
Charset charsetContent,
ContentMessageType contentType,
Set<EmailParticipant> recipientEmail)
The constructor if this message.
|
TemplatedOutgoingMessage(String subject,
String pathToTemplate,
Map<String,Object> params,
Charset charsetContent,
ContentMessageType contentType,
Set<EmailParticipant> recipientEmail,
List<EmailAttachment> attachments,
TransferEncoder transferEncoder)
The constructor if this message.
|
TemplatedOutgoingMessage(String subject,
String pathToTemplate,
Map<String,Object> params,
Set<EmailParticipant> recipientEmail)
The constructor if this message.
|
TemplatedOutgoingMessage(String subject,
String pathToTemplate,
Map<String,Object> params,
Set<EmailParticipant> recipientEmail,
List<EmailAttachment> attachments)
The constructor if this message.
|
| Modifier and Type | Method and Description |
|---|---|
static TemplatedOutgoingMessage.TemplatedMessageBuilder |
builder()
Returns an instance of the builder for this class.
|
protected String |
constructContent(String path,
Map<String,Object> params)
Creates text content from a path to a templated file and parameters for this one.
|
String |
toString() |
outgoingMessageBuilderaddAllContent, addContent, getAllContentsAsString, getAllContentsAsStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttachments, getContents, getId, getReceivedDate, getRecipients, getSender, getSentDate, getSize, getSubject, getTransferEncoder, isSeenpublic TemplatedOutgoingMessage(String subject, String pathToTemplate, Map<String,Object> params, Set<EmailParticipant> recipientEmail) throws TemplateCreationException
subject - a subject of a messagepathToTemplate - a path to template. See TemplateUtils.createTemplate(String).params - parameters of a templaterecipientEmail - message recipientsTemplateCreationException - if content from the template wasn't can construct.public TemplatedOutgoingMessage(String subject, String pathToTemplate, Map<String,Object> params, Set<EmailParticipant> recipientEmail, List<EmailAttachment> attachments) throws TemplateCreationException
subject - a subject of a messagepathToTemplate - a path to template. See TemplateUtils.createTemplate(String).params - parameters of a templaterecipientEmail - message recipientsattachments - message attached filesTemplateCreationException - if content from the template wasn't can construct.public TemplatedOutgoingMessage(String subject, String pathToTemplate, Map<String,Object> params, Charset charsetContent, ContentMessageType contentType, Set<EmailParticipant> recipientEmail) throws TemplateCreationException
subject - a subject of a messagepathToTemplate - a path to template. See TemplateUtils.createTemplate(String).params - parameters of a templatecharsetContent - a charset of the contentcontentType - a value of a Content-Type header for contentrecipientEmail - message recipientsTemplateCreationException - if content from the template wasn't can construct.public TemplatedOutgoingMessage(String subject, String pathToTemplate, Map<String,Object> params, Charset charsetContent, ContentMessageType contentType, Set<EmailParticipant> recipientEmail, List<EmailAttachment> attachments, TransferEncoder transferEncoder) throws TemplateCreationException
subject - a subject of a messagepathToTemplate - a path to template. See TemplateUtils.createTemplate(String).params - parameters of a templatecharsetContent - a charset of the contentcontentType - a value of a Content-Type header for contentrecipientEmail - message recipientsattachments - message attached filestransferEncoder - a value for a Content-Transfer-Encoding headerTemplateCreationException - if content from the template wasn't can construct.public static TemplatedOutgoingMessage.TemplatedMessageBuilder builder()
protected String constructContent(String path, Map<String,Object> params) throws TemplateCreationException
TemplateCreationExceptionpublic String toString()
toString in class DefaultOutgoingMessageCopyright © 2023. All rights reserved.