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

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

This widget could not be displayed.

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?

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

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

109 views 1 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you