Customizing mail support

All the mail support in jBPM is centralized in one class: org.jbpm.mail.Mail This is an ActionHandler implementation. Whenever an mail is specified in the process xml, this will result in a delegation to the mail class. It is possible to inherit from the Mail class and customize certain behaviour for your perticular needs. To configure your class to be used for mail delegations, specify a 'jbpm.mail.class.name' configuration string in the jbpm.cfg.xml like this:

<jbpm-configuration>
  ...
  <string name='jbpm.mail.class.name' value='com.your.specific.CustomMail' />
</jbpm-configuration>

The customized mail class will be read during parsing and actions will be configured in the process that reference the configured (or the default) mail classname. So if you change the property, all the processes that were already deployed will still refer to the old mail class name. But they can be easily updated with one simple update statement to the jbpm database.