Interface MailConfigBuilder
- All Known Implementing Classes:
MailConfigBuilderImpl
public interface MailConfigBuilder
can be used in scripts to build and send mails
-
Method Summary
Modifier and TypeMethodDescriptionbuilds a mail from a template that can be further adjusted and needs to be sent by callingMail.send()
void
send a mail built from a template to a single recipientvoid
send a mail built from a template to a single recipient with some entity as sourcevoid
send a mail built from a template with a specified locale to a single recipient with some entity as sourcevoid
send a mail built from a template with a specified locale to a single recipientdefault MailConfigBuilder
unwrap()
-
Method Details
-
send
send a mail built from a template to a single recipient- Parameters:
templateName
- the template to userecipient
- the recipient- Throws:
MailException
- if anything goes wrong while building or sending the mail
-
send
send a mail built from a template with a specified locale to a single recipient- Parameters:
templateName
- the template to userecipient
- the recipientlocale
- the locale with which the template is processed- Throws:
MailException
- if anything goes wrong while building or sending the mail
-
send
send a mail built from a template to a single recipient with some entity as source- Parameters:
templateName
- the template to userecipient
- the recipientsourceEntity
- the entity to be used as source for the mail- Throws:
MailException
- if anything goes wrong while building or sending the mail
-
send
void send(String templateName, Entity recipient, Entity sourceEntity, Locale locale) throws MailException send a mail built from a template with a specified locale to a single recipient with some entity as source- Parameters:
templateName
- the template to userecipient
- the recipientsourceEntity
- the entity to be used as source for the maillocale
- the locale with which the template is processed- Throws:
MailException
- if anything goes wrong while building or sending the mail
-
create
builds a mail from a template that can be further adjusted and needs to be sent by callingMail.send()
- Parameters:
templateName
- the template to use- Returns:
- the mail object to be configured and sent
- Throws:
MailException
- if anything goes wrong while building or sending the mail
-
unwrap
-