Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail to send HTML based emails

 
Raghu Nathan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • 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
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • 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
  • 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: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would imagine that HTML mail gets a higher spam score than plain text mail.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!