Hi there,

Supposing that I receive an Exchange using Camel Mail and I want to see
whether the body is of the required MIME type; is it valid to do this:

  // See if our exchange body contains the calendar object.
  DataHandler bodyDataHandler = exchange.getIn().getBody(
                DataHandler.class);
  if (bodyDataHandler != null) {
    ...
  }

I know that I can retrieve attachments as DataHandlers, but am I able to do
so for the body itself? The documentation implies that the body is coerced
to a string...

I have already incorporated the above code in my application and I'm waiting
for someone to send the type of message that may also answer this post.
However it'll be several hours before I know.

Thanks!

Kind regards,
Christopher
-- 
View this message in context: 
http://old.nabble.com/Retrieving-MailMessage-bodies-as-DataHandler-objects-tp27142905p27142905.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to