Yes, happened to me when I started to also add attachments.
This solved my problem:

message.setHeader(Exchange.*CONTENT_TYPE*, "text/plain");

It worked fine without setting the contenttype at start, but after I added
this in my processor the body was also sent as an attachement:

ByteArrayDataSource rawData = new ByteArrayDataSource(
        exchange.getProperty("WS_REQUEST", "",
          String.class), "text/xml;charset=utf-8");
      DataHandler data = new DataHandler(rawData);

      message.addAttachment("ws_request.xml", data);

(It is part of an error handling where I need to save the WS SOAP request to
external provider when some conditions apply in the SOAP response. I store
that in the exchange properties, not sure if there are better ways to
accomplish this.)


2011/8/11 lunchbox <lunchbox4s...@gmail.com>

> Hi all,
>
> For some reason, email that is sent from Camel doesn't have the message
> text
> in the email body. Instead, we end up having an attachment, called
> ATT00001.xml, which contains, as plain text, the message body.
>
> At first I did not notice this, since Apple Mail automatically displayed
> the
> attachment contents in the message body. However, this is noticed when
> using
> a different mail client.
>
> Has anyone else noticed this? How can I make the email content appear
> normally as text in the email body, instead of in this "fake" XML
> attachment?
>
> Thanks,
> Lunchbox
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-sent-email-content-goes-to-an-attachment-ATT00001-xml-tp4689081p4689081.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to