[jboss-user] [JBoss jBPM] - How to use Mail.send() ?

HeinerNiehues do-not-reply at jboss.com
Thu Nov 22 12:57:45 EST 2007


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 {
  |                 JbpmConfiguration.Configs.getObject("jbpm.mail.smtp.host");
  |                 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();
  |                 l.add("thereceiver at gmail.com");
  |                 Mail.send(p, "username",l, "The subject", "The text");
  |             } catch (Exception e ) {
  |                 e.printStackTrace();
  |             }

A JbpmException: couldnt send email with the cause:
javax.mail.AuthenticationFailedException

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

best regards


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107174#4107174

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107174



More information about the jboss-user mailing list