FIX: Prevent email encoding issues when attachments are added (PR #10770)

When attachments are added to an outgoing email we have to do some faffing around with the Mail gem parts (refer to However this causes the charset of the html and text parts to revert to US-ASCII which causes encoding issues. For example this:

It’s a fine day.

Turns into:

It’s a fine day.

This PR changes the way we add the parts back to the email to better reflect the example in where we use the decoded body string and provide the content type and charset as parameters so we are explicit about what we want.


Very nice!