File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Render HTML Formattings in Desktop.mail(URI) messages body.

 
Hewa Naimanage Sumedha Amalka
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone ever used the Desktop.mail(URI) method to generate an e-mail and successfully used HTML within the e-mail body?
I need to launch default mail program with a Subject and HTML contained Body in a cross-platform. I know this is possible using the JavaMail API, but I'm running into problems with that given my firm's implementation of heavy security around Microsoft Exchange.

Right now this is my simple code:



However, the body of the e-mail actually shows the HTML tags and does not format the text as intended.

Any guidance is appreciated very much.

Thank you,
Amalka
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For anything that's supposed to work in a cross-platform way you're much better off not using HTML in emails. What's more, to get this to work you'd need support for MIME attachments, and the API you're using does not support that.
 
Hewa Naimanage Sumedha Amalka
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf Dittmer, Thanks for your reply. The J2SE application which Im working with at the moment; the mail inquiry must contain with a custom HTML template in the message body.
Is there any other API available for this task?
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic