camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huntc <hu...@mac.com>
Subject Re: Retrieving MailMessage bodies as DataHandler objects
Date Thu, 14 Jan 2010 09:14:35 GMT


Claus Ibsen-2 wrote:
> 
> You can get access to the underlying javax.mail.Message...
> 
Thanks Claus. I'm now trying out the following and just waiting for another
message to come through:


  // See if our exchange body contains the calendar object.
  javax.mail.Message mailMessage = exchange.getIn(MailMessage.class)
    .getMessage();
  if (logger.isDebugEnabled()) {
    logger.debug("Message received: " + mailMessage);
  }
  try {
    DataHandler bodyDataHandler = mailMessage.getDataHandler();
    if (bodyDataHandler != null) {
      addCalendarDataToCalendars(calendars, bodyDataHandler);
    }
  } catch (MessagingException e) {
    logger.error(e);
  }


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message