Class 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 Detail

      • javaMailNotAvailable

        protected static boolean javaMailNotAvailable
    • Constructor Detail

      • EmailHelper

        public EmailHelper()
    • 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
      • newSession

        @Deprecated(since="11.1")
        public static javax.mail.Session newSession​(Properties props)
        Deprecated.
        since 11.1, use MailSessionBuilder
        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