I need to send an email using the ISO-8559-1 charSet but cannot figure out exactly what to do. Using the following code I receive the HTML emails as expected, but get an "Unsupported Encoding Exception". I am not even sure if what follows is the correct way to do this. Any help would be appreciated.
The following is what I have:
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(cSendFrom));
InternetAddress[] address = {new InternetAddress(cSendTo)};
message.setRecipients(Message.RecipientType.TO, address);
message.setSubject(cSubject);
message.setSentDate(new Date());
if (cCharSet.length() > 0) {
message.setContent(MimeUtility.encodeText(cPlainTextMsg, cCharSet, "Q"));
}
else {
message.setText(cPlainTextMsg);
}