Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

streams in javamail  RSS feed

 
Karthik Iyer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I was using an SMTP mail program along with an UUEncoder class, that made it possible to pass a HTML formatted string as a parameter. This string will be converted into a html page and sent as an attachment with the email. However when i migrated to JavaMail, i found that the only way to send an attachment was if we had the file physically present in a folder (FileDataSource accepts a file name or a file object as a parameter).
Is there anyway that i can circumvent this and send a string as an attachment by writing it into a stream or something, so that the creation of the physical file in a folder can be avoided.
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!