you just have to specify message's type as "text/HTML" in ur code..
here is the code :
=========================================================
try{
String to ="To";
String from ="From";
String cc ="CC";
String bcc ="BCC";
String subject ="Subject";
String smtp ="your SMTP server IP";
String message="<html> <title>
TEST </title> <body> Hello! </body> </html>";
String result="";
Properties props = System.getProperties();
// Puts the SMTP server name to properties object
props.put("mail.smtp.host", smtp);
// Get the default Session using Properties Object
Session session1 = Session.getDefaultInstance(props, null);
// Enable the debug mode
session1.setDebug(true);
// Create a New message
MimeMessage msg = new MimeMessage(session1);
// Set the From address
msg.setFrom(new InternetAddress(from));
// Setting the "To recipients" addresses
msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to, false));
// Setting the "cc recipients" addresses
msg.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc, false));
// Setting the "Bcc recipients" addresses
msg.setRecipients(Message.RecipientType.BCC,InternetAddress.parse(bcc, false));
// Sets the Subject
msg.setSubject(subject);
// set the meaasge in HTML format
msg.setContent(message,"text/html");
// Set the Date: header
msg.setSentDate(new java.util.Date());
// Send the message
Transport.send(msg);
// If here, then message is successfully sent.
// Display Success message
result = result + "Mail sent To: "+ to;
//if cced then, add html for displaying info
if (!cc.equals(""))
result = result +"cced To: "+cc;
//if Bcced then, add html for displaying info
if (!bcc.equals(""))
result = result +"Bcced To: "+bcc ;
result = result+"";
System.out.println(result);
} // END OF TRY
catch (Exception e)
{
// If here, then error in sending Mail. Display Error message.
result=result+"Unable to send your message"+e;
System.out.println(result);
}//end catch block
===================================================================