public class EmailHelper extends Object
An email helper:
 Hashtable mail = new Hashtable();
 mail.put("from", "[email protected]");
 mail.put("to", "[email protected]");
 mail.put("subject", "a subject");
 mail.put("template", "a template name");
 <p>
 EmailHelper.sendmail(mail);
 
 Currently only supports one email in to address| Modifier and Type | Field and Description | 
|---|---|
protected static boolean | 
javaMailNotAvailable  | 
| Constructor and Description | 
|---|
EmailHelper()  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
evaluateMvelExpresssion(String expr,
                       Map<String,Serializable> ctx)
Evaluates a MVEL expression within some context infos accessible on the "NotificationContext" object. 
 | 
protected Map<String,Object> | 
initMvelBindings(Map<String,Serializable> infos)  | 
static javax.mail.Session | 
newSession(Properties props)
Instantiates a new session that authenticates given the protocol's properties. 
 | 
void | 
sendmail(Map<String,Object> mail)
Static Method: sendmail(Map mail). 
 | 
protected void | 
sendmail0(Map<String,Object> mail)  | 
protected static boolean javaMailNotAvailable
public EmailHelper()
public void sendmail(Map<String,Object> mail) throws javax.mail.MessagingException
mail - A map of the settingsjavax.mail.MessagingExceptionprotected void sendmail0(Map<String,Object> mail) throws javax.mail.MessagingException, IOException, freemarker.template.TemplateException, LoginException, RenderingException
javax.mail.MessagingExceptionIOExceptionfreemarker.template.TemplateExceptionLoginExceptionRenderingExceptionpublic static javax.mail.Session newSession(Properties props)
protected Map<String,Object> initMvelBindings(Map<String,Serializable> infos)
public String evaluateMvelExpresssion(String expr, Map<String,Serializable> ctx)
Copyright © 2019 Nuxeo. All rights reserved.