It looks like the mail component does not support charset handling for
alternative part? I can set Content-Type for main body but MailBinding does
not extract out charset from Content-Type?

Class: MailBinding

{code}
protected void createMultipartAlternativeMessage(MimeMessage mimeMessage,
MailConfiguration configuration, Exchange exchange)
        throws MessagingException, IOException {

        MimeMultipart multipartAlternative = new
MimeMultipart("alternative");
        mimeMessage.setContent(multipartAlternative);

        BodyPart plainText = new MimeBodyPart();
        plainText.setText(getAlternativeBody(configuration, exchange));
        // remove the header with the alternative mail now that we got it
        // otherwise it might end up twice in the mail reader
       
exchange.getIn().removeHeader(configuration.getAlternativeBodyHeader());
        multipartAlternative.addBodyPart(plainText);
{code}

But it should instead be -

 plainText.setText(getAlternativeBody(configuration, exchange), charset);

Please let me know if I am missing something obvious and there is way to
specify it?

Thanks!

-- 
View this message in context: 
http://old.nabble.com/Camel-Mail%3A-Alternative-part-does-not-handle-charset--tp27882178p27882178.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to