Hi You can possible disable mapping mail message mapMailMessage=false
And then work on the javax.mail.Message directly. See a bit details at http://camel.apache.org/mail.html On Fri, Dec 14, 2012 at 3:20 PM, Gregor <gregor.kid...@channeladvisor.com> wrote: > Hey folks, > > I've got an issue where we're trying to forward an email from one system to > another, basically by reading the emails from one account, sending the > message to a processor where the headers gets altered with the correct To > headers, and then passed on to be send from another account. > > This looks like it should be as simple as (not including the brackets to the > XML isn't stripped) > > from > uri=imaps://imap.gmail.com?username={{email.username}}&password={{email.password}}&consumer.delay=6000&unseen=false&fetchSize=5 > > bean ref="myProcessor" > > to > uri="smtps://smtp.gmail.com?username={{email.username}}&password={{email.password}}" > > The myProcessor bean is where we alter the headers (and do a couple of > non-relevant-to-this-discussion things). > > The issue is when the email is more than slightly complicated (i.e. a > multipart email), the Camel mail component is just doing a toString on the > body, which results in a very small email being recieved with the body of... > > javax.mail.internet.MimeMultipart@2fd77b9a > > Which is obviously wrong! > > Any ideas how to have Camel just send the original email with the new > headers, without altering the body at all? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-forward-multipart-emails-using-Camel-tp5724101.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