Interface MailHandler

    • Method Detail

      • applyTemplate

        String applyTemplate​(ApplyMailTemplateParams params)
        Applies the configured e-mail template. Variables in the form {name} are replaced. All profile field variables are supported (see ProfileFieldHandler#getProfileFieldVariables(BasicUser)), plus others, such as: subject, message, salutation, unsubscribe, applicationName, date, dateTime, day, month and year.
      • getMailSender

        JavaMailSender getMailSender()
        Returns a JavaMailSender for the current configuration
      • send

        void send​(BasicUser from,
                  BasicUser to,
                  MailContext context,
                  MailContentProducer producer)
        Creates a new mail pending to be sent by MailProcessingPollingTask.
        If context is FORWARD_INTERNAL_MESSAGE:
      • The "From name" of the message will be the name of the given from user
      • The "From address" of the message will be the one declared in the configuration of the given from user.
      • The "Reply-to address" of the message will be the address of the given from user.
      • If context is NEW_EMAIL_VALIDATION:
      • The "To address" will be the new email