aspose file tools*
The moose likes Java in General and the fly likes Render HTML Formattings in Desktop.mail(URI) messages body. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Render HTML Formattings in Desktop.mail(URI) messages body." Watch "Render HTML Formattings in Desktop.mail(URI) messages body." New topic
Author

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

Hewa Naimanage Sumedha Amalka
Greenhorn

Joined: Oct 31, 2006
Posts: 19
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


SCJP 1.4 71%, SCWCD 1.5 84%, SCBCD 90%, SCMAD 98%
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41880
    
  63
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.


Ping & DNS - my free Android networking tools app
Hewa Naimanage Sumedha Amalka
Greenhorn

Joined: Oct 31, 2006
Posts: 19
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Render HTML Formattings in Desktop.mail(URI) messages body.