0 Replies Latest reply on Aug 27, 2012 6:04 AM by 0sameerk0

    Exception when trying to use email service jbpm5.3

    0sameerk0

      I have a flow as start-->email-->end node.

       

      When i am running the below code in a standalone java file it is working and i am getting mail in mailbox.

       

      EmailWorkItemHandler emailHandler=new EmailWorkItemHandler(smtp, port, "my-emailid-on that smtp","my password");

      emailHandler.getConnection().setStartTls(true);

      ksession.getWorkItemManager().registerWorkItemHandler("Email", emailHandler);

       

      But when i run this in jboss application server then it is throwing an error as below:

       

      javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client

       

       

      I also tried running it in jboss with null username and password

       

      EmailWorkItemHandler emailHandler=new EmailWorkItemHandler(smtp, port,null,null);

      emailHandler.getConnection().setStartTls(true);

      ksession.getWorkItemManager().registerWorkItemHandler("Email", emailHandler);

       

      then it is throwing below error:

       

      com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Anonymous client does not have permissions to send as this sender

       

      Pls tell me which username and password should i use and whether i need to do any configuration changes?