Is it possible to use MimeMessageHelper to construct a message with the following MIME structure:
And this one:Code:multipart/alternative text/plain text/html
From what I've seen, creating the helper with the multipart parameter set to "true" results in the top-level type being set to multipart/related, and I don't see how to set it to multipart/alternative. I think this is the more common pattern used for messages with a plain text and an HTML part.Code:multipart/alternative text/plain multipart/related text/html image/gif image/gif
Also, I think that for "attachments", it's most common to make the overall type multipart/mixed. This is more widely supported than multipart/related (it was in the original MIME RFC, whereas multipart/related was a later addition proposed by Netscape), and multipart/related is really only needed if you're sending HTML with embedded images, CSS files, etc.
These are examples of common structures for messages with attachments:
Or:Code:multipart/mixed text/plain ("body" of message) application/x-pdf
I realize I can use the JavaMail API directly to achieve this, but it would be nice if MimeMessageHelper could do this (and if it does, I'd appreciate it if someone could tell me how). Thanks.Code:multipart/mixed multipart/alternative text/plain text/html application/x-pdf


Reply With Quote