// set the email message text
// (plain text or HTML depending on the content type)
MimeBodyPart msgPart = new MimeBodyPart();
debug(context.getListener().getLogger(), "messageContentType = %s", messageContentType);
if (messageContentType.startsWith("text/html")) {
String inlinedCssHtml = new CssInliner().process(text);
msgPart.setContent(inlinedCssHtml, messageContentType);
} else {
msgPart.setContent(text, messageContentType);
}
return msgPart;