Interface MailGenerator

    • Method Detail

      • generateMail

        String generateMail​(String templateName,
                            AuthenticationKey authkey,
                            String baseUrl)
        Generates a mail string from a template. How the template will be located depends on the underlying implementation. It uses a default locale.
        Parameters:
        templateName - the template name without extension
        authkey - the authentication key of the current user
        baseUrl - the base url
        Returns:
        A string for the mail body generated from the template
      • generateMail

        String generateMail​(String templateName,
                            Locale locale,
                            AuthenticationKey authenticationKey,
                            String baseUrl)
        Generates a mail string from a template. The given locale is used for retrieving the template. How the template will be located depends on the underlying implementation.
        Parameters:
        templateName - the template name without extension
        locale - the locale used to find the template file
        authenticationKey - the authentication key of the current user
        baseUrl - the base url
        Returns:
        a string for the mail body generated from the template
      • generateMail

        String generateMail​(String templateName,
                            Locale locale,
                            AuthenticationKey authenticationKey,
                            String baseUrl,
                            Map<String,​Object> templateData)
        Generates a mail string from a template. The given locale is used for retrieving the template. How the template will be located depends on the underlying implementation. The templateData is used as model data that is interpolated from the template.
        Parameters:
        templateName - the template name without extension
        locale - the locale used to find the template file
        authenticationKey - the authentication key of the current user
        baseUrl - the base url
        templateData - additional data used for interpolation in the template
        Returns:
        a string for the mail body generated from the template