Please use [ code ] ... [ /code ] tags (no spaces inside brackets) around the snippet when posting code or configuration.
Make 'emailChannel' a publish-subscribe channel and subscribe another endpoint (e.g. <service-activator/>) to it.
The subscribers will be invoked in the order they appear in the configuration file, but I prefer to always add an 'order' attribute to make it clear (e.g. ob adapter order="1", service-activator order="2" will ensure the adapter is always called before the sa, regardless of where their configuration resides).
If the mail send fails, the second endpoint won't be invoked and the exception will be thrown back to the caller, or sent to the errorChannel if so configured.
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware