Bamboo email misuses multipart/alternative, html-formatting does not display in gmail

Brent Villalobos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2011

Bamboo automatically generates emails for build failures/successes. These emails use the multipart/alternative encoding in order to provide both plain-text and html-formatted versions of the same email content. However, the order of the parts is wrong – bamboo puts the html part first and the plain-text part second. This causes gmail to display only the plain-text part even though it is capable of displaying the html-formatted email.

Bamboo is not properly conforming to RFC2046:

http://www.ietf.org/rfc/rfc2046.txt

{quote}

In general, user agents that compose multipart/alternative entities must place the body parts in increasing order of preference, that is, with the preferred format last. For fancy text, the sending user agent should put the plainest format first and the richest format last. Receiving user agents should pick and display the last format they are capable of displaying.

{quote}

1 answer

0 votes
James Dumay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2011

Thanks for reporting! Putting aside the RFC violation, Atlassian uses GMail for our company mail and we have no problems displaying Bamboo notification emails. We checked the code and it looks like we are putting plain text first then the html mime part.

What version of Bamboo are you using? It might be possible that this was the case for older Bamboo versions. Are you able to paste the raw contents of the email that isn't displaying correctly somewhere for us to look at?

Brent Villalobos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2011

I'm on Bamboo v3.2 build 2600 - 20 Jul 11.

David Roazen December 8, 2011

We have the same problem -- Bamboo is putting the html part first and the text part second, causing only the text part to display in gmail. The odd thing is, the emails USED to display correctly as html, and then one day after an IT outage and subsequent server reboot they suddenly started displaying as text. This is with Bamboo 3.1.3 build 2415 - 16 Jun 2011.

The layout of the multipart Bamboo notification emails looks like this:

Content-Type: multipart/mixed; boundary="===============2871037132198455339=="

--===============2871037132198455339==
Content-Type: multipart/alternative;
boundary="----=_Part_9_1002751765.1323454744228"

------=_Part_9_1002751765.1323454744228
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

THIS SECTION IS EMPTY


------=_Part_9_1002751765.1323454744228
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

HTML VERSION OF EMAIL HERE

------=_Part_9_1002751765.1323454744228
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

TEXT VERSION OF EMAIL HERE

------=_Part_9_1002751765.1323454744228--
--===============2871037132198455339==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

TEXT FOOTER HERE

--===============2871037132198455339==--

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events