In Mail class,
Session session = Session.getDefaultInstance(mailServerProperties, null);
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.
sorry i made mistake while putting this topic the part is inside parent code should be outside .