1 Reply Latest reply on Sep 14, 2010 7:05 AM by Michael Wohlfart

    About MailSessionImpl

    green wood Newbie

      hi, there


      Can I create my MailSessionImpl extend the default one, and put it somewhere that can be used in my process.


      If so , thanks very much  for giving some advises .


      For doing this is:  I dont want to stop(exit) my process when our mailserver or internet down, I just need to log it and continue my process..


      Many Thanks



        • 1. Re: About MailSessionImpl
          Michael Wohlfart Expert

          You can use your own mail session by implementing the org.jbpm.pvm.internal.email.spi.MailSession interface and leaving out the <mail-session /> tag in your jbpm.cfg.xml, instead provide a <object class="your.own.MailSessionImpl"> each time a mail needs to be send the MailSession.send(Collection<Message> emails) method will be called and you can do whatever you want with the emails. Extending jBPM4's MailSessionImpl is a bit more tricky, you somehow need to inject the mailServers as far as i can tell, best take a look at the MailSessionBinding to check how this can be done.