On Fri, Nov 9, 2012 at 10:54 AM, zzkozak <mar...@pikula.de> wrote: > Hi, > > given the route: > > > > if the /orderRequestCreator/ throws an exception, I would expect an email > to be send to fo...@baaaar.com containing the exception. Instead, the mail > component throws me an exception telling the body were null. This is > probably caused by the timer used at the begining of the route. > > So, what is wrong with this route? >
You need to transform the message body before sending the email, so it can contain what you want to send, such as the stacktrace, and maybe some leading information. http://camel.apache.org/message-translator.html If you just want the stacktrace you can do transform using the simple language http://camel.apache.org/simple <onException ...> <transform> <simple>There was a problem due ${exception.message} and the stracktrace is ${exception.stacktrace}</simple> ... </onException> > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-send-a-mail-containing-an-exception-caught-with-onException-tp5722389.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen