nl.surfnet.coin.csa.service.impl
Class EmailServiceImpl

java.lang.Object
  extended by nl.surfnet.coin.csa.service.impl.EmailServiceImpl
All Implemented Interfaces:
EmailService

public class EmailServiceImpl
extends Object
implements EmailService


Field Summary
static String RECOMMENTATION_EMAIL_TEMPLATE
           
 
Constructor Summary
EmailServiceImpl()
           
 
Method Summary
 void sendMail(String from, String subject, String body)
          Send an email message.
 void sendTemplatedMultipartEmail(String subject, String templateName, Locale locale, List<String> recipients, String from, Map<String,Object> templateVars)
          Send a (multipart) email message using a (freemarker) template.
 void setAdministrativeEmail(String administrativeEmail)
           
 void setFreemarkerConfiguration(freemarker.template.Configuration freemarkerConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECOMMENTATION_EMAIL_TEMPLATE

public static final String RECOMMENTATION_EMAIL_TEMPLATE
See Also:
Constant Field Values
Constructor Detail

EmailServiceImpl

public EmailServiceImpl()
Method Detail

sendMail

public void sendMail(String from,
                     String subject,
                     String body)
Send an email message.

Specified by:
sendMail in interface EmailService

sendTemplatedMultipartEmail

public void sendTemplatedMultipartEmail(String subject,
                                        String templateName,
                                        Locale locale,
                                        List<String> recipients,
                                        String from,
                                        Map<String,Object> templateVars)
Description copied from interface: EmailService
Send a (multipart) email message using a (freemarker) template. This method will look up the html and plaintext freemarker template and will replace the placeholders with the values in the templateVars. A Multipart email message will be created and send.

Specified by:
sendTemplatedMultipartEmail in interface EmailService
Parameters:
subject - The subject of the email
templateName - the name of the template (it will lookup templateName.ftl and templateName-plaintext.ftl in the path from the freemarker configuration)
locale - The locale to use for the template
recipients - List of recipients (being email addresses)
from - The 'from' email address of the sender
templateVars - a map with variables to use in the Freemarker template

setAdministrativeEmail

public void setAdministrativeEmail(String administrativeEmail)

setFreemarkerConfiguration

public void setFreemarkerConfiguration(freemarker.template.Configuration freemarkerConfiguration)


Copyright © 2013 SURFnet bv, The Netherlands. All Rights Reserved.