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

HTML in Desktop.mail(URI)?

 
Brian Batson
Greenhorn
Posts: 11
  • 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 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. I feel like I'm missing something obvious. As a side note, I really wish attachments were possible using the Desktop.mail(URI) method.

Any guidance is appreciated very much.

Thank you,
Brian
 
Wim Vanni
Ranch Hand
Posts: 96
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I notice that it is rather incomplete html you're writing there (no <body> tag for example). Not sure if that matters in this particular case.

Cheers,
Wim

Edit: StackOverflow lists an answer that in the mailto body you have to use plaintext.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic