Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

HTML in Desktop.mail(URI)?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic