Class EmailFactoryImpl

    • Field Detail

      • mailSender

        protected org.springframework.mail.javamail.JavaMailSender mailSender
      • freeMarkerConfig

        protected freemarker.template.Configuration freeMarkerConfig
      • templatePrefix

        protected String templatePrefix
      • templateSuffix

        protected String templateSuffix
      • templateEncoding

        protected String templateEncoding
    • Constructor Detail

      • EmailFactoryImpl

        public EmailFactoryImpl()
    • Method Detail

      • setMailSender

        public void setMailSender​(org.springframework.mail.javamail.JavaMailSender mailSender)
      • setFreeMarkerConfig

        public void setFreeMarkerConfig​(freemarker.template.Configuration freeMarkerConfig)
      • setTemplatePrefix

        public void setTemplatePrefix​(String templatePrefix)
      • setTemplateSuffix

        public void setTemplateSuffix​(String templateSuffix)
      • setTemplateEncoding

        public void setTemplateEncoding​(String templateEncoding)
      • getEmail

        public Email getEmail​(String from,
                              String[] to,
                              String[] cc,
                              String[] bcc,
                              String subject,
                              String body,
                              boolean html,
                              File... attachments)
                       throws EmailException
        Description copied from interface: EmailFactory
        Creates a new Email.
        Specified by:
        getEmail in interface EmailFactory
        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

        public Email getEmail​(String from,
                              String[] to,
                              String[] cc,
                              String[] bcc,
                              String replyTo,
                              String subject,
                              String body,
                              boolean html,
                              File... attachments)
                       throws EmailException
        Description copied from interface: EmailFactory
        Creates a new Email.
        Specified by:
        getEmail in interface EmailFactory
        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

        public Email getEmail​(String from,
                              String[] to,
                              String[] cc,
                              String[] bcc,
                              String subject,
                              String templateName,
                              Object templateModel,
                              boolean html,
                              File... attachments)
                       throws EmailException
        Description copied from interface: EmailFactory
        Creates a new Email.
        Specified by:
        getEmail in interface EmailFactory
        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

        public Email getEmail​(String from,
                              String[] to,
                              String[] cc,
                              String[] bcc,
                              String replyTo,
                              String subject,
                              String templateName,
                              Object templateModel,
                              boolean html,
                              File... attachments)
                       throws EmailException
        Description copied from interface: EmailFactory
        Creates a new Email.
        Specified by:
        getEmail in interface EmailFactory
        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