Interface EmailFactory

All Known Implementing Classes:
EmailFactoryImpl

public interface EmailFactory
Factory for creating Emails.
Author:
avasquez
  • Method Details

    • getEmail

      Email getEmail(String from, String[] to, String[] cc, String[] bcc, String subject, String body, boolean html, File... attachments) throws EmailException
      Creates a new Email.
      Parameters:
      from - the sender's address
      to - the recipients' addresses (optional)
      cc - the CC recipients' addresses (optional)
      bcc - the BCC recipients' addresses (optional)
      subject - the subject of the email
      body - the text body of the email
      html - if the body is in HTML format
      attachments - the attachments to add to the email
      Returns:
      the created email
      Throws:
      EmailException
    • getEmail

      Email getEmail(String from, String[] to, String[] cc, String[] bcc, String replyTo, String subject, String body, boolean html, File... attachments) throws EmailException
      Creates a new Email.
      Parameters:
      from - the sender's address
      to - the recipients' addresses (optional)
      cc - the CC recipients' addresses (optional)
      bcc - the BCC recipients' addresses (optional)
      replyTo - the address to reply to
      subject - the subject of the email
      body - the text body of the email
      html - if the body is in HTML format
      Returns:
      the created email
      Throws:
      EmailException
    • getEmail

      Email getEmail(String from, String[] to, String[] cc, String[] bcc, String subject, String templateName, Object templateModel, boolean html, File... attachments) throws EmailException
      Creates a new Email.
      Parameters:
      from - the sender's address
      to - the recipients' addresses (optional)
      cc - the CC recipients' addresses (optional)
      bcc - the BCC recipients' addresses (optional)
      subject - the subject of the email
      templateName - the template name of the email
      templateModel - the template model of the email
      html - if the body is in HTML format
      Returns:
      the created email
      Throws:
      EmailException
    • getEmail

      Email getEmail(String from, String[] to, String[] cc, String[] bcc, String replyTo, String subject, String templateName, Object templateModel, boolean html, File... attachments) throws EmailException
      Creates a new Email.
      Parameters:
      from - the sender's address
      to - the recipients' addresses (optional)
      cc - the CC recipients' addresses (optional)
      bcc - the BCC recipients' addresses (optional)
      replyTo - the address to reply to
      subject - the subject of the email
      templateName - the template name of the email
      templateModel - the template model of the email
      html - if the body is in HTML format
      Returns:
      the created email
      Throws:
      EmailException