• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaMail to send HTML based emails

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,
Are there any potential problems in sending HTML based emails (with minor formatting, links and line breaks) using JavaMail?

One thing I know is how a non-HTML based email client would read that. I saw that in Gmail's textual email reader and the formatting was missing and the links that were behind the text showed up "on the side". So I did not lose anything content-wise.

Is there anything else that I am missing? I really want to use an HTML based email rather than simple text.

Thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should definitely use both plain text and HTML. What GMail might do is of little consequence, what matters is what ALL email readers will do, and since you can't test that you need to be on the safe side and send a plain text version as well. Furthermore, some people will turn off HTML in emails because they don't like it.

In order to send both plain text and HTML in the same mail you need to use attachments. This tutorial will get you started with that.
 
Raghu Nathan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Ulf.

I have the code to send emails as multipart - to send plain-text as well as HTML based email.

But that aside, there is no downside to sending HTML based email, is there?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would imagine that HTML mail gets a higher spam score than plain text mail.
 
reply
    Bookmark Topic Watch Topic
  • New Topic