Class EmailConfig


  • @Configuration
    @EnableConfigurationProperties(EmailConfigProperties.class)
    @ConditionalOnProperty(name="awe.mail.enabled",
                           havingValue="true")
    public class EmailConfig
    extends Object
    Email configuration
    Author:
    dfuentes Created by dfuentes on 25/04/2017.
    • Constructor Detail

      • EmailConfig

        public EmailConfig​(EmailConfigProperties emailConfigProperties)
        EmailConfig constructor
        Parameters:
        emailConfigProperties - email config properties
    • Method Detail

      • defaultMail

        @Bean
        @ConditionalOnMissingBean
        public org.springframework.mail.javamail.JavaMailSender defaultMail()
        Default JavaMail configuration
        Returns:
        Mail sender
      • emailService

        @Bean
        @ConditionalOnMissingBean
        public EmailService emailService​(org.springframework.mail.javamail.JavaMailSender mailSender,
                                         XMLEmailBuilder emailBuilder,
                                         BaseConfigProperties baseConfigProperties)
        Email service
        Parameters:
        mailSender - Mail sender
        emailBuilder - Email builder
        baseConfigProperties - Base configuration properties
        Returns:
        Email service bean
      • emailMaintainConnector

        @Bean
        @ConditionalOnMissingBean
        public EmailMaintainConnector emailMaintainConnector​(EmailService emailService)
        Email Maintain connector
        Parameters:
        emailService - Email service
        Returns:
        Email Maintain connector bean
      • xmlEmailBuilder

        @Bean
        @ConditionalOnMissingBean
        @Scope("prototype")
        public XMLEmailBuilder xmlEmailBuilder​(QueryService queryService,
                                               QueryUtil queryUtil)
        XML Email builder
        Returns:
        XML Email builder bean