1 Reply Latest reply on May 12, 2009 5:25 AM by Swati S

    Mail Node Problem

    Swati S Newbie

      In Mail class,

      Session session = Session.getDefaultInstance(mailServerProperties, null);
      

      If the mail server requires user authentication, this condition is not handled in mail class. So I created one custom class which extends Mail class.
       if(auth) {
       session = Session.getDefaultInstance(mailServerProperties, new Authenticator() {
       public PasswordAuthentication getPasswordAuthentication() {
       return new PasswordAuthentication(userName, password);
       }
       });
       } else {
       session = Session.getDefaultInstance(mailServerProperties, null);
       }
      this is not complete code...
      made changes in jbpm.cf.xml file
      <string name='jbpm.mail.class.name' value='org.jbpm.mail.CustomMail'/>
      and put this custommail class file in web inf folder of jbpm-console war file...
      But when i used mail-node in process definition, still it delegates request to old Mail class not the CustomMail class.