spring boot send email html template

Solutions on MaxInterview for spring boot send email html template by the best coders in the world

showing results for - "spring boot send email html template"
Kelya
05 Feb 2016
1@Bean
2    @Primary
3    public FreeMarkerConfigurationFactoryBean getFreeMarkerConfiguration() throws IOException {
4        FreeMarkerConfigurationFactoryBean bean = new FreeMarkerConfigurationFactoryBean();
5        ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), "/templates");
6        bean.setPostTemplateLoaders(ctl);
7        return bean;
8    }
Mariana
27 Jan 2019
1@Bean 
2public FreeMarkerConfigurer freemarkerClassLoaderConfig() {
3    Configuration configuration = new Configuration(Configuration.VERSION_2_3_27);
4    TemplateLoader templateLoader = new ClassTemplateLoader(this.getClass(), "/mail-templates");
5    configuration.setTemplateLoader(templateLoader);
6    FreeMarkerConfigurer freeMarkerConfigurer = new FreeMarkerConfigurer();
7    freeMarkerConfigurer.setConfiguration(configuration);
8    return freeMarkerConfigurer; 
9}