[ 
https://issues.apache.org/jira/browse/GERONIMO-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244427#comment-14244427
 ] 

Thomas Neidhart commented on GERONIMO-6536:
-------------------------------------------

The problem is in line 437 
(http://svn.apache.org/viewvc/geronimo/specs/tags/geronimo-javamail_1.4_spec-1.7.1/src/main/java/javax/mail/internet/MimeBodyPart.java?view=markup):

{code}
 public void setText(String text, String charset, String subtype) throws 
MessagingException {
427     // we need to sort out the character set if one is not provided.
428     if (charset == null) {
429     // if we have non us-ascii characters here, we need to adjust this.
430     if (!ASCIIUtil.isAscii(text)) {
431     charset = MimeUtility.getDefaultMIMECharset();
432     }
433     else {
434     charset = "us-ascii";
435     }
436     }
437     setContent(text, "text/plain; charset=" + MimeUtility.quote(charset, 
HeaderTokenizer.MIME));
438     } 
{code}

should be "text/" + subtype

> MimeBodyPart.setText(String, String, String)  ignores subType
> -------------------------------------------------------------
>
>                 Key: GERONIMO-6536
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6536
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: mail
>            Reporter: Thomas Neidhart
>
> This has been detected as part of [EMAIL-147].
> When creating the mime message, we call MimeBodyPart.setText(String, String, 
> String) with html as subtype, but when calling this method, the subType is 
> completely ignored and the resulting contentType is always "text/plain".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to