I am trying to send an email (using Outlook mail) from a jsp page. Requirement is, when the user clicks on send email button the data stored in a string (with HTML tags) should be passed to the mailbody. But the problem is, the text displayed in mail body is not formatted as HTML text.
Could you please suggest how to format it as HTML text in Outlook Doc. I have used the below code in a function-
function OpenOutlookDoc(whatform,msgBody)
{
outlookApp = new ActiveXObject("Outlook.Application");
nameSpace = outlookApp.getNameSpace("MAPI");
mailFolder = nameSpace.getDefaultFolder(6);
mailItem = mailFolder.Items.add(whatform);
mailItem.Display(0);
mailItem.To = "[email protected]";
mailItem.Subject = "TEST MAIL";
mailItem.Messageclass = whatform;
mailItem.Body = msgBody; //the text here is concatenated with HTML tags
mailItem.Send();
}
Thanks for you upcoming help..