Commit 7f946f2e authored by Hussein's avatar Hussein

P4A-1122 Reorder multipart/alternative parts to comply RFC1341 spec.

parent d9603985
......@@ -147,9 +147,9 @@ public class MimeMessageBuilder extends MessageBuilder {
// This is the compiled MIME part for an HTML message.
MimeMultipart composedMimeMessage = MimeMultipart.newInstance();
composedMimeMessage.setSubType("alternative"); // Let the receiver select either the text or the HTML part.
composedMimeMessage.addBodyPart(new MimeBodyPart(body, "text/html"));
bodyPlain = buildText(SimpleMessageFormat.TEXT);
composedMimeMessage.addBodyPart(new MimeBodyPart(bodyPlain, "text/plain"));
composedMimeMessage.addBodyPart(new MimeBodyPart(body, "text/html"));
if (hasAttachments) {
// If we're HTML and have attachments, we have a MimeMultipart container to hold the
// whole message (mp here), of which one part is a MimeMultipart container
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment