Hi,
I have an application that is sending out emails to my clients.
Some mails are text based and some are html based depending on their
preferences.
Text emails are fine.
I am setting up the HTML email as follows:
<SNIP>
message.setRecipients(RecipientType.TO,createRecip ientAddress(address));
message.setFrom(new InternetAddress(from, friendly));
message.setHeader("Subject",subject);
message.setSentDate(new Date());
message.setDataHandler(new DataHandler(new
ByteArrayDataSource(text,"text/html;charset=iso-8859-1")));
message.setHeader("Content-Transfer-Encoding", "base64");
</SNIP>
Now, some of my clients are receiving the mail fine and can read the HTML
text, and the source appears to be being encoded in base64 correctly. Some
are not able to read this and just see the the encoded data.
If I do not set the encoding to base64 and leace as default, then again,
most people can read the mail fine, but some are reporting pure html markup!
Also, without the base64 encoding header, they embedded stylesheet in the
html is being corrupted (IE: The "." are being stripped from class defs!)
Does anyone have any idea what could be the problem in either scenario, or
what is the best way to do this?
Steve