public class MailManager extends Object implements MailManagerLocal, MailManagerRemote
| Modifier | Constructor and Description |
|---|---|
|
MailManager() |
protected |
MailManager(javax.mail.Session mailSession) |
| Modifier and Type | Method and Description |
|---|---|
void |
sendEmailWithTemplate(List<String> usersName,
String TemplateKey,
Map<String,Object> properties) |
void |
sendEmailWithTemplate(String email,
String templateKey,
Map<String,Object> properties) |
void |
sendMail(String subject,
String contenu,
String addrs)
Send an email message to a list of addresses
|
protected static void |
setMessageContent(javax.mail.Message message,
String contenu)
Merge the email template(s) using the velocity context and add the
content to the JavaMail message object
|
protected MailManager(javax.mail.Session mailSession)
public MailManager()
public void sendMail(String subject, String contenu, String addrs)
sendMail in interface MailManagerLocalconfig - The configuration to use (specified in the email properties)address - The receivers of the emailExceptionprotected static void setMessageContent(javax.mail.Message message,
String contenu)
throws IOException,
javax.mail.MessagingException
message - The message that will receive the message contentconfiguration - The configuration to usecontext - The velocity context that will be used to merge the mail
templatesExceptionIOExceptionjavax.mail.MessagingExceptionpublic void sendEmailWithTemplate(String email, String templateKey, Map<String,Object> properties)
sendEmailWithTemplate in interface MailManagerLocalpublic void sendEmailWithTemplate(List<String> usersName, String TemplateKey, Map<String,Object> properties)
sendEmailWithTemplate in interface MailManagerLocalCopyright © 2012. All Rights Reserved.