commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C.Grobmeier <>
Subject Re: [EMAIL] - Sending both text plain and html.
Date Tue, 19 Dec 2006 09:02:11 GMT


> Hi, if im not misstaken common-email can  send both a body part with a
> plain text and a body part of html in one mail. So the reciever either
> get the text or html depending on the recievers email client settings.
> Is this true?
> Then second question how to i impl that. Like this?

You need HTML-Messages. Visit this:
and search for "HTML formatted email". You will see the following:

HtmlEmail email = new HtmlEmail();
// set the html message
email.setHtmlMsg("<html>The apache logo - <img src=\"cid:"+cid+"\"></html>");
// set the alternative message
email.setTextMsg("Your email client does not support HTML messages");

That should do fine.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message