Multipart with both text/html and embedded images
843834Mar 9 2009 — edited Apr 9 2009Is it possible to build a multi-part message with both text and html as well as images used within the html?
I can do a multi-part message with both text and html using Multiart mymultipart = new MimeMultipart("alternative") and then two body parts: first with setContent(xxx,"text/plain") and the second with setContent(yyy,"text/html").
I can embed images within my html by using Multiart mymultipart = new MimeMultipart("related") and then two body parts: first with setContent(xxx,"text/html") and then one or more body parts for the images with setContent(yyy,"image/jpg") and setHeader("Content-id","<imagename>") where "imagename" is referenced in the html as src="cid:imagename".
My question is whether or not it is possible to do both, i.e. first have a text version of the message, and then have an html version with related or embedded images?
Thanks,
ddsp.