commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <>
Subject [jira] [Commented] (EMAIL-142) HtmlEmail with both html and text provided has invalid content-type
Date Tue, 30 Sep 2014 20:19:33 GMT


Thomas Neidhart commented on EMAIL-142:

The root container for the mime message will always be created with content-type multipart/mixed,
but in case text and html message has been provided a child container with type multipart/alternative
will be added containing the 2 messages, see the example mail below:

Date: Tue, 30 Sep 2014 22:11:35 +0200 (CEST)
Message-ID: <>
Subject: [email] 1.Test: text + html content
MIME-Version: 1.0
Content-Type: multipart/mixed;

Content-Type: multipart/alternative;

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Your email client does not support HTML messages
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<html><b>This is a HTML message without any image</b><html>


If I open this message with thunderbird, it correctly displays the HTML message.

> HtmlEmail with both html and text provided has invalid content-type 
> --------------------------------------------------------------------
>                 Key: EMAIL-142
>                 URL:
>             Project: Commons Email
>          Issue Type: Bug
>    Affects Versions: 1.3.2
>            Reporter: Marcin Tomiak
>             Fix For: 1.3.3
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
> If I set both html and plain text for HtmlEmail i.e.:
> email.setHtmlMsg(htmlMessage);
> email.setTextMsg(plainTextMessage);
> then message which is sent has Content-type: multipart/mixed;
> This content type is recognized for example by Mozilla Thunderbird as a message with
> Correct content-type for this kind of email is Content-type: multipart/alternative;

This message was sent by Atlassian JIRA

View raw message