Interface EmailTemplateProvider

All Superinterfaces:
Provider
All Known Implementing Classes:
FreeMarkerEmailTemplateProvider

public interface EmailTemplateProvider extends Provider
Author:
Stian Thorgersen
  • Field Details

  • Method Details

    • setAuthenticationSession

      EmailTemplateProvider setAuthenticationSession(AuthenticationSessionModel authenticationSession)
    • setRealm

    • setUser

    • setAttribute

      EmailTemplateProvider setAttribute(String name, Object value)
    • renderPasswordReset

      default RenderedEmail renderPasswordReset(String link, long expirationInMinutes) throws EmailException
      Builds the reset password email without sending it. Override together with send(RenderedEmail, int, EmailDeliveryListener).
      Returns:
      the email, or null if this provider can only send right away
      Throws:
      EmailException
    • send

      default void send(RenderedEmail email, int expiresAt, EmailDeliveryListener onFailed) throws EmailException
      Sends an email built by one of the render methods, in the background after the transaction commits when possible, otherwise right away.
      Parameters:
      expiresAt - time in seconds after which the email is no longer worth sending, 0 for no limit
      onFailed - called if sending in the background fails later
      Throws:
      EmailException
    • sendEvent

      void sendEvent(Event event) throws EmailException
      Throws:
      EmailException
    • sendPasswordReset

      void sendPasswordReset(String link, long expirationInMinutes) throws EmailException
      Reset password sent from forgot password link on login
      Parameters:
      link -
      expirationInMinutes -
      Throws:
      EmailException
    • sendSmtpTestEmail

      void sendSmtpTestEmail(Map<String,String> config, UserModel user) throws EmailException
      Test SMTP connection with current logged in user
      Parameters:
      config - SMTP server configuration
      user - SMTP recipient
      Throws:
      EmailException
    • sendConfirmIdentityBrokerLink

      void sendConfirmIdentityBrokerLink(String link, long expirationInMinutes) throws EmailException
      Send to confirm that user wants to link his account with identity broker link
      Throws:
      EmailException
    • sendExecuteActions

      void sendExecuteActions(String link, long expirationInMinutes) throws EmailException
      Change password email requested by admin
      Parameters:
      link -
      expirationInMinutes -
      Throws:
      EmailException
    • sendVerifiableCredentialOffer

      void sendVerifiableCredentialOffer(String link, long expirationInMinutes) throws EmailException
      Throws:
      EmailException
    • sendVerifyEmail

      void sendVerifyEmail(String link, long expirationInMinutes) throws EmailException
      Throws:
      EmailException
    • sendOrgInviteEmail

      void sendOrgInviteEmail(OrganizationModel organization, String link, long expirationInMinutes) throws EmailException
      Throws:
      EmailException
    • sendEmailUpdateConfirmation

      void sendEmailUpdateConfirmation(String link, long expirationInMinutes, String address) throws EmailException
      Throws:
      EmailException
    • send

      void send(String subjectFormatKey, String bodyTemplate, Map<String,Object> bodyAttributes) throws EmailException
      Send formatted email
      Parameters:
      subjectFormatKey - message property that will be used to format email subject
      bodyTemplate - freemarker template file
      bodyAttributes - attributes used to fill template
      Throws:
      EmailException
    • send

      void send(String subjectFormatKey, List<Object> subjectAttributes, String bodyTemplate, Map<String,Object> bodyAttributes) throws EmailException
      Send formatted email
      Parameters:
      subjectFormatKey - message property that will be used to format email subject
      subjectAttributes - attributes used to fill subject format message
      bodyTemplate - freemarker template file
      bodyAttributes - attributes used to fill template
      Throws:
      EmailException
    • send

      void send(String subjectFormatKey, String bodyTemplate, Map<String,Object> bodyAttributes, String destinationEmail) throws EmailException
      Send formatted email to a specific address, ignoring the user's email
      Parameters:
      subjectFormatKey - message property that will be used to format email subject
      bodyTemplate - freemarker template file
      bodyAttributes - attributes used to fill template
      destinationEmail - the email address to send the email to
      Throws:
      EmailException
    • send

      void send(String subjectFormatKey, List<Object> subjectAttributes, String bodyTemplate, Map<String,Object> bodyAttributes, String destinationEmail) throws EmailException
      Send formatted email to a specific address, ignoring the user's email
      Parameters:
      subjectFormatKey - message property that will be used to format email subject
      subjectAttributes - attributes used to fill subject format message
      bodyTemplate - freemarker template file
      bodyAttributes - attributes used to fill template
      destinationEmail - the email address to send the email to
      Throws:
      EmailException