on 10-21-2011 7:25 PM
Hi,
I wrote a bean shell script to send mail on particular event. I want mail message body text font style to be modified.
Please provide help on this.
Thanks,
Saloni
Hi Saloni ,
You can add the text in the following way by using font tags for message body in your custom mail.
Message msg = new MimeMessage(session);
MimeMultipart mp = new MimeMultipart();
MimeBodyPart mbp1= new MimeBodyPart();
String htmlText = "<b> This is formatted</b>"+
"<font size =\"5\" face=\"arial\" >This paragraph is in Arial, size 5</font>";
mbp1.setContent(htmlText,"text/html");
mp.addBodyPart(mbp1);
msg.setContent(mp);
It worked for me. Let me know if you face any issue.
Regards,
Uday.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.