3 Replies Latest reply on Nov 23, 2007 12:29 PM by Heiner Niehues

    How to use Mail.send() ?

    Heiner Niehues Newbie

      When i use the email-node the Email transmission in JBPM works fine.

      Now, I created an own ActionHandler for sending emails. But it doesnt works. I tried to use the method

      org.jbpm.mail.Mail.Mail.send(Properties, String, List, String, String)

      but I guess i made something wrong:
      try {
       Properties p = new Properties();
       p.put("mail.smtp.host", JbpmConfiguration.Configs.getObject("jbpm.mail.smtp.host"));
       p.put("mail.smtp.port", JbpmConfiguration.Configs.getObject("jbpm.mail.smtp.port"));
       p.put("mail.smtp.auth", JbpmConfiguration.Configs.getObject("jbpm.mail.smtp.auth"));
       p.put("mail.smtp.ssl", JbpmConfiguration.Configs.getObject("jbpm.mail.smtp.ssl"));
       p.put("mail.smtp.user", JbpmConfiguration.Configs.getObject("jbpm.mail.smtp.user"));
       p.put("mail.smtp.password", JbpmConfiguration.Configs.getObject("jbpm.mail.smtp.password"));
       List l = new ArrayList();
       Mail.send(p, "username",l, "The subject", "The text");
       } catch (Exception e ) {

      A JbpmException: couldnt send email with the cause:

      Actually i am using the same data like for the MailNode..

      best regards