Class EmailHelper
- java.lang.Object
-
- org.nuxeo.ecm.platform.ec.notification.email.EmailHelper
-
public class EmailHelper extends Object
Class EmailHelper.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
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
javaMailNotAvailable
-
Constructor Summary
Constructors Constructor Description EmailHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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)
Deprecated.since 11.1, useMailSessionBuilder
void
sendmail(Map<String,Object> mail)
Static Method: sendmail(Map mail).protected void
sendmail0(Map<String,Object> mail)
-
-
-
Method Detail
-
sendmail
public void sendmail(Map<String,Object> mail) throws javax.mail.MessagingException
Static Method: sendmail(Map mail).- Parameters:
mail
- A map of the settings- Throws:
javax.mail.MessagingException
-
sendmail0
protected void sendmail0(Map<String,Object> mail) throws javax.mail.MessagingException, IOException, freemarker.template.TemplateException, RenderingException
- Throws:
javax.mail.MessagingException
IOException
freemarker.template.TemplateException
RenderingException
-
newSession
@Deprecated(since="11.1") public static javax.mail.Session newSession(Properties props)
Deprecated.since 11.1, useMailSessionBuilder
Instantiates a new session that authenticates given the protocol's properties. Initializes also the default transport protocol handler according to the properties.- Since:
- 5.6
-
evaluateMvelExpresssion
public String evaluateMvelExpresssion(String expr, Map<String,Serializable> ctx)
Evaluates a MVEL expression within some context infos accessible on the "NotificationContext" object. Returns null if the result is not evaluated to a String- Since:
- 5.6
-
-