want to generate html formatted email that supports outlook?
rajeshkannan sella
Greenhorn
Joined: Apr 23, 2009
Posts: 25
posted
0
Hi Friends,
I want to generate html formatted email using java that will be supported in outlook, actually i have tried org.apache.commons.mail.HtmlEmail still it fails for outlook.
Help me
Thanks
Rajesh
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
What, exactly, do you mean by "fail"? What did you try, and how did or didn't it work? TellTheDetails
the url will be treated as hyperlink when its a html email.so it works well as htnl formatted in googlemail,hot mail etc.but for out look its just a plain text
When I use my personal web-based e-mail account to send a message like that to my work e-mail account, Outlook doesn't recognize that piece of text as a URL and doesn't render it as a link.
So like everyone already said, that's what Outlook does with text e-mails. Send an HTML e-mail if that's what you want.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
One more thing to try: make sure the HTML is well-formed - header, body, HTML tags etc.
rajeshkannan sella
Greenhorn
Joined: Apr 23, 2009
Posts: 25
posted
0
For html formatted email we have a class called org.apache.commons.mail.HtmlEmail. im using that even though im not getting a html formatted email in outlook.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35253
7
posted
0
Just because there's a classes called "HtmlEmail" doesn't mean that it'll work with incorrect HTML.
rajeshkannan sella
Greenhorn
Joined: Apr 23, 2009
Posts: 25
posted
0
This code makes message body html formatted as per API reference
Lewin Chan
Ranch Hand
Joined: Oct 10, 2001
Posts: 214
posted
0
rajeshkannan sella wrote:
This code makes message body html formatted as per API reference
It seems somewhat optimistic to assume to assume that HtmlEmail can actually mark up what you have submitted as HTML (sure it might be add a couple of tags around of your text; but I would be pretty surprised if there was a full on text parser in it that understood when to make <a> tags and the like).
Try downloading the source to commons email and look at the source to HtmlEmail.
L
rajeshkannan sella
Greenhorn
Joined: Apr 23, 2009
Posts: 25
posted
0
Thanks for the help.now i can able to generate html formatted email with the use Patterns