• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

HTML in Desktop.mail(URI)?

 
Greenhorn
Posts: 11
  • 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
 
Ranch Hand
Posts: 96
Eclipse IDE Oracle Java
  • 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.
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic