You could create a custom mail producer by implement
You could find more information in developer guide http://docs.jboss.com/jbpm/v4/devguide/html_single/#custommailproducers.
Thanks a lot for your help.
We realize MailProducer can solve our concern (2) and (3), but the problem is our concern (1): the mail server is not reachable (known by either a check or a predefined flag) from the deploying host, and do not send mail (so there is NO exception thrown).
Actually we are looking for a property in "jbpm.mail.properties" or a flag in somewhere (e.g. jbpm.default.cfg.xml) that can tell the MailSession to stop sending email.
Or is there a way to turn off jbpm MailSession AND the "mail node" will not throw exception ?
Your help is very appreciated.
You could just return an empty list in your MailProducer. Then there is no mail to send to the MailServer.
Initially we are looking for a solution either in jbpm.mail.property or in jbpm.default.cfg.xml to turn off the mail session, or something like that. But since we already implemented MailProducer (to generate the physical mail file), the solution is still good for us.
Thank you so much for your help.