Hi Mark

I dont think there is a reason for that. You are welcome to look into this.
Create a JIRA ticket and and if possible provide a patch.

We love contributions.
http://camel.apache.org/contributing.html



On Wed, Aug 3, 2011 at 4:52 PM, Mark Ford <[email protected]> wrote:
> The toString method in org.apache.camel.component.mail.MailConverters
> is overloaded to handle both javax.mail.Message and
> javax.mail.Multipart. The implementation fo the Message version checks
> for a MimeMultipart instance and if so uses the first body part. The
> implementation of the Multipart version walks the message and uses the
> first text content type.
>
> Why are these methods handling the conversion differently?
>
> I came across this because the mail server I'm testing against
> (squirrelmail) isn't returning Content-Type for MimeMultipart
> messages. I kept seeing javax.mail.internet.MimeMultipart@123456 for
> the message payload because the @Converter method is MailConverts was
> not handling the case of the missing Content-Type and a default
> toString was used. After reviewing the code, it looks like it would
> work fine if I disabled the mapping of the Message content and left
> the original payload as a javax.mail.Message.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to