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

    Fields
    Modifier and Type
    Field
    Description
    static final Boolean
    A boolean variable required for any EmailClient
  • Method Summary

    Modifier and Type
    Method
    Description
    sendEmail(String subject, String recipientEmail, String emailBody)
    This sends an email with the least amount of information needed to be provided.
    sendEmail(String subject, String recipientEmail, String emailBody, List<File> attachments)
    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.
    void
    setRequireTls(Boolean requireTls)
    Requires any EmailClient to include the setRequireTls method.
  • Field Details

    • requireTls

      static final Boolean requireTls
      A boolean variable required for any EmailClient
  • Method Details

    • sendEmail

      T sendEmail(String subject, String recipientEmail, String emailBody)
      This sends an email with the least amount of information needed to be provided.
      Parameters:
      subject - The subject line of the email
      recipientEmail - The email address that will get the email, aka the To field
      emailBody - The plain text version of the email body
      Returns:
      A generic T
    • sendEmail

      T sendEmail(String subject, String recipientEmail, String emailBody, List<File> attachments)
      This sends an email with the least amount of information needed to be provided, but with attachments.
      Parameters:
      subject - The subject line of the email
      recipientEmail - The email address that will get the email, aka the To field
      emailBody - The plain text version of the email body
      attachments - 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 email
      recipientEmail - The email address that will get the email, aka the To field
      emailsToCC - A list of emails to be added into the CC field
      emailsToBCC - A list of emails to be added into the BCC field
      emailBody - The plain text version of the email body
      attachments - A list of files that will be added as attachments to the email
      Returns:
      A generic T
    • setRequireTls

      void setRequireTls(Boolean requireTls)
      Requires any EmailClient to include the setRequireTls method.
      Parameters:
      requireTls - A Boolean that can be used to set requireTLS