Search in sources :

Example 1 with EmailInfo

use of org.broadleafcommerce.common.email.service.info.EmailInfo in project BroadleafCommerce by BroadleafCommerce.

the class ScanConfig method blEmailInfo.

@Bean
public EmailInfo blEmailInfo() {
    EmailInfo info = new EmailInfo();
    info.setFromAddress("client");
    return info;
}
Also used : EmailInfo(org.broadleafcommerce.common.email.service.info.EmailInfo) Bean(org.springframework.context.annotation.Bean)

Example 2 with EmailInfo

use of org.broadleafcommerce.common.email.service.info.EmailInfo in project BroadleafCommerce by BroadleafCommerce.

the class AdminSpringBootTestConfiguration method blEmailInfo.

@Bean
public EmailInfo blEmailInfo() {
    EmailInfo info = new EmailInfo();
    info.setFromAddress("support@mycompany.com");
    info.setSendAsyncPriority("2");
    info.setSendEmailReliableAsync("false");
    return info;
}
Also used : EmailInfo(org.broadleafcommerce.common.email.service.info.EmailInfo) MapFactoryBean(org.springframework.beans.factory.config.MapFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 3 with EmailInfo

use of org.broadleafcommerce.common.email.service.info.EmailInfo in project BroadleafCommerce by BroadleafCommerce.

the class AdminSpringBootTestConfiguration method blRegistrationEmailInfo.

@Bean
public EmailInfo blRegistrationEmailInfo() {
    EmailInfo info = blEmailInfo();
    info.setSubject("You have successfully registered!");
    info.setEmailTemplate("register-email");
    return info;
}
Also used : EmailInfo(org.broadleafcommerce.common.email.service.info.EmailInfo) MapFactoryBean(org.springframework.beans.factory.config.MapFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 4 with EmailInfo

use of org.broadleafcommerce.common.email.service.info.EmailInfo in project BroadleafCommerce by BroadleafCommerce.

the class AdminSpringBootTestConfiguration method blReturnConfirmationEmailInfo.

@Bean
public EmailInfo blReturnConfirmationEmailInfo() {
    EmailInfo info = blEmailInfo();
    info.setSubject("Your return with The Heat Clinic");
    info.setEmailTemplate("returnConfirmation-email");
    return info;
}
Also used : EmailInfo(org.broadleafcommerce.common.email.service.info.EmailInfo) MapFactoryBean(org.springframework.beans.factory.config.MapFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 5 with EmailInfo

use of org.broadleafcommerce.common.email.service.info.EmailInfo in project BroadleafCommerce by BroadleafCommerce.

the class EmailTest method testSynchronousEmail.

@Test
public void testSynchronousEmail() throws Exception {
    EmailInfo info = new EmailInfo();
    info.setFromAddress("me@test.com");
    info.setSubject("test");
    info.setEmailTemplate("org/broadleafcommerce/common/email/service/template/default.vm");
    info.setSendEmailReliableAsync("false");
    emailService.sendTemplateEmail("to@localhost", info, null);
}
Also used : EmailInfo(org.broadleafcommerce.common.email.service.info.EmailInfo) Test(org.testng.annotations.Test)

Aggregations

EmailInfo (org.broadleafcommerce.common.email.service.info.EmailInfo)15 Bean (org.springframework.context.annotation.Bean)8 MapFactoryBean (org.springframework.beans.factory.config.MapFactoryBean)7 NullEmailInfo (org.broadleafcommerce.common.email.service.info.NullEmailInfo)2 Serializable (java.io.Serializable)1 HashMap (java.util.HashMap)1 Locale (java.util.Locale)1 JMSException (javax.jms.JMSException)1 Message (javax.jms.Message)1 ObjectMessage (javax.jms.ObjectMessage)1 Session (javax.jms.Session)1 MimeMessage (javax.mail.internet.MimeMessage)1 ByteArrayDataSource (javax.mail.util.ByteArrayDataSource)1 EmailTarget (org.broadleafcommerce.common.email.domain.EmailTarget)1 EmailException (org.broadleafcommerce.common.email.service.exception.EmailException)1 MessageCreator (org.springframework.jms.core.MessageCreator)1 MimeMessageHelper (org.springframework.mail.javamail.MimeMessageHelper)1 MimeMessagePreparator (org.springframework.mail.javamail.MimeMessagePreparator)1 Test (org.testng.annotations.Test)1