Fix issues where emails would have multipart/mixed when they should not.

When sending multi-part emails with no attachments we shouldn't include
the outer multipart/mixed header as it confuses Outlook and causes it to
show the email as having attachments even though there are none.

A bunch of tests need to be adjusted as the empty multipart/mixed
container has been removed.

Fixes #3474