Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Mail - Multipart Messages and Attachments  RSS feed

 
Dave Hewy
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to create an email message with alternative parts (text and HTML) which works ok, but I also want to add some attachments that I ALWAYS want to appear.
The problem is, when I create my Multipart message like this...

I see the attachments and both the text and html versions, though one is an attachment. But when I change the code above to this...

I correctly just get either the text or html, but my other attachments are now missing. Having trawled the WWW for a while I can't work out what I'm doing wrong, I'm just attaching the emails like this...

and I know that the attachmentPart is setup ok, because it does show when I'm not using alternative as described above.

Does anyone have any ideas ?

Dave.
 
Dave Hewy
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this answers my question...

http://www.jguru.com/forums/view.jsp?EID=528015
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!