You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lunchbox <lu...@gmail.com> on 2011/08/11 12:26:05 UTC

Camel-sent email content goes to an attachment "ATT00001.xml"?

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.

Re: Camel-sent email content goes to an attachment "ATT00001.xml"?

Posted by OrackBahama <jd...@metadok.de>.
Hi all,

seems this is not a problem of Camel but of Microsoft exchange servers.

See:

http://support.microsoft.com/kb/969854/en-us

or

http://kb.mit.edu/confluence/pages/viewpage.action?pageId=4981187

Regards



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sent-email-content-goes-to-an-attachment-ATT00001-xml-tp4689081p5752793.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-sent email content goes to an attachment "ATT00001.xml"?

Posted by lunchbox <lu...@gmail.com>.
Hi Magnus,

Yes, thank you, this fixed the problem. We also had a text/xml content-type
from some earlier manipulations.

Thanks,
Lunchbox





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sent-email-content-goes-to-an-attachment-ATT00001-xml-tp4689081p4689212.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-sent email content goes to an attachment "ATT00001.xml"?

Posted by Magnus Palmér <ma...@gmail.com>.
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 <lu...@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.
>