Interface MailConfigBuilder

All Known Implementing Classes:
MailConfigBuilderImpl

public interface MailConfigBuilder
can be used in scripts to build and send mails
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String templateName)
    builds a mail from a template that can be further adjusted and needs to be sent by calling Mail.send()
    void
    send(String templateName, Entity recipient)
    send a mail built from a template to a single recipient
    void
    send(String templateName, Entity recipient, Entity sourceEntity)
    send a mail built from a template to a single recipient with some entity as source
    void
    send(String templateName, Entity recipient, Entity sourceEntity, Locale locale)
    send a mail built from a template with a specified locale to a single recipient with some entity as source
    void
    send(String templateName, Entity recipient, Locale locale)
    send a mail built from a template with a specified locale to a single recipient
     
  • Method Details

    • send

      void send(String templateName, Entity recipient) throws MailException
      send a mail built from a template to a single recipient
      Parameters:
      templateName - the template to use
      recipient - the recipient
      Throws:
      MailException - if anything goes wrong while building or sending the mail
    • send

      void send(String templateName, Entity recipient, Locale locale) throws MailException
      send a mail built from a template with a specified locale to a single recipient
      Parameters:
      templateName - the template to use
      recipient - the recipient
      locale - the locale with which the template is processed
      Throws:
      MailException - if anything goes wrong while building or sending the mail
    • send

      void send(String templateName, Entity recipient, Entity sourceEntity) throws MailException
      send a mail built from a template to a single recipient with some entity as source
      Parameters:
      templateName - the template to use
      recipient - the recipient
      sourceEntity - 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 use
      recipient - the recipient
      sourceEntity - the entity to be used as source for the mail
      locale - the locale with which the template is processed
      Throws:
      MailException - if anything goes wrong while building or sending the mail
    • create

      Mail create(String templateName) throws MailException
      builds a mail from a template that can be further adjusted and needs to be sent by calling Mail.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

      default MailConfigBuilder unwrap()