Hi,

There were two problems with the mail classes in the
mail utility package.

1) There was no way to set the character set of mail messages
2) HtmlEmail did not work with Microsoft Exchange mail servers

I have solved the first problem in a backward compatible way, and
therefore I will not post those changes to the list.

The second problem cannot be solved in a backward compatible way,
since all html formatted messages will be using the new format.
I have tested this with all mail servers that i have access to,
and the results are identical to the results with the old code,
with the exception that HtmlEmail now works with MS Exchange.


Here is the relevant part from HtmlEmail.java

@@ -126,19 +126,13 @@
         msg.setSubType("alternative");
         main.setContent(msg);

-        /* The text part. */
+        // The text part.
         msgText = new MimeBodyPart();
         msg.addBodyPart(msgText);

-        /* The HTML part. */
-        htmlContent = new MimeMultipart();
-        htmlContent.setSubType("related");
-        MimeBodyPart bphtml = new MimeBodyPart();
-        msg.addBodyPart(bphtml);
-        bphtml.setContent(htmlContent);
-
+        // The HTML part.
         msgHtml = new MimeBodyPart();
-        htmlContent.addBodyPart(msgHtml);
+        msg.addBodyPart(msgHtml);
     }

     /**


----------------------------------
Magnús Þór Torfason
CTO
handPoint
Iceland

e-mail: [EMAIL PROTECTED] / [EMAIL PROTECTED]
office: +354 - 561 0700
mobile: +354 - 699 8799



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to