Package formflow.library.email
Interface EmailClient<T>
- Type Parameters:
T- A Generic that can be set as the return type for the sendEmail method
- All Known Implementing Classes:
MailgunEmailClient
public interface EmailClient<T>
An interface that can be implemented by objects to send email.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BooleanA boolean variable required for any EmailClient -
Method Summary
Modifier and TypeMethodDescriptionThis sends an email with the least amount of information needed to be provided.This sends an email with the least amount of information needed to be provided, but with attachments.sendEmail(String subject, String recipientEmail, List<String> emailsToCC, List<String> emailsToBCC, String emailBody, List<File> attachments) This sends an email with the most customizations.voidsetRequireTls(Boolean requireTls) Requires any EmailClient to include the setRequireTls method.
-
Field Details
-
requireTls
A boolean variable required for any EmailClient
-
-
Method Details
-
sendEmail
This sends an email with the least amount of information needed to be provided.- Parameters:
subject- The subject line of the emailrecipientEmail- The email address that will get the email, aka the To fieldemailBody- The plain text version of the email body- Returns:
- A generic T
-
sendEmail
This sends an email with the least amount of information needed to be provided, but with attachments.- Parameters:
subject- The subject line of the emailrecipientEmail- The email address that will get the email, aka the To fieldemailBody- The plain text version of the email bodyattachments- A list of files that will be added as attachments to the email- Returns:
- A generic T
-
sendEmail
T sendEmail(String subject, String recipientEmail, List<String> emailsToCC, List<String> emailsToBCC, String emailBody, List<File> attachments) This sends an email with the most customizations.- Parameters:
subject- The subject line of the emailrecipientEmail- The email address that will get the email, aka the To fieldemailsToCC- A list of emails to be added into the CC fieldemailsToBCC- A list of emails to be added into the BCC fieldemailBody- The plain text version of the email bodyattachments- A list of files that will be added as attachments to the email- Returns:
- A generic T
-
setRequireTls
Requires any EmailClient to include the setRequireTls method.- Parameters:
requireTls- A Boolean that can be used to set requireTLS
-