servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r635571 - /servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java
Date Mon, 10 Mar 2008 14:50:40 GMT
Author: lhein
Date: Mon Mar 10 07:50:38 2008
New Revision: 635571

URL: http://svn.apache.org/viewvc?rev=635571&view=rev
Log:
fixed problem that attachments where not shown in thunderbird mail client when sent by the
mail bc
(kontact however was able to display the mails attachments)

Modified:
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java?rev=635571&r1=635570&r2=635571&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java
(original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java
Mon Mar 10 07:50:38 2008
@@ -162,7 +162,7 @@
         if (isPlainTextMessage && !isHtmlMessage) {
             // a plain text mail will be sent - no attachments
             if (content != null) {
-                content.setSubType("alternative");
+                content.setSubType("mixed");
                 MimeBodyPart textBodyPart = new MimeBodyPart();
                 textBodyPart.setContent(nmsg.getProperty(AbstractMailMarshaler.MSG_TAG_TEXT).toString(),
                                         "text/plain");
@@ -173,13 +173,13 @@
         } else if (isHtmlMessage && !isPlainTextMessage) {
             // a html message will be sent - no attachments
             if (content != null) {
-                content.setSubType("alternative");
+                content.setSubType("mixed");
                 MimeBodyPart htmlBodyPart = new MimeBodyPart();
                 htmlBodyPart.setContent(nmsg.getProperty(AbstractMailMarshaler.MSG_TAG_HTML).toString(),
                                         "text/html");
                 content.addBodyPart(htmlBodyPart);
             } else {
-                content = new MimeMultipart("alternative");
+                content = new MimeMultipart("mixed");
                 MimeBodyPart htmlBodyPart = new MimeBodyPart();
                 htmlBodyPart.setContent(nmsg.getProperty(AbstractMailMarshaler.MSG_TAG_HTML).toString(),
                                         "text/html");
@@ -190,7 +190,7 @@
         } else if (isHtmlMessage && isPlainTextMessage) {
             // both parts will be sent - plain text and html
             if (content != null) {
-                content.setSubType("alternative");
+                content.setSubType("mixed");
                 MimeBodyPart textBodyPart = new MimeBodyPart();
                 MimeBodyPart htmlBodyPart = new MimeBodyPart();
                 textBodyPart.setContent(nmsg.getProperty(AbstractMailMarshaler.MSG_TAG_TEXT).toString(),
@@ -200,7 +200,7 @@
                 content.addBodyPart(textBodyPart);
                 content.addBodyPart(htmlBodyPart);
             } else {
-                content = new MimeMultipart("alternative");
+                content = new MimeMultipart("mixed");
                 MimeBodyPart textBodyPart = new MimeBodyPart();
                 MimeBodyPart htmlBodyPart = new MimeBodyPart();
                 textBodyPart.setContent(nmsg.getProperty(AbstractMailMarshaler.MSG_TAG_TEXT).toString(),
@@ -220,12 +220,12 @@
 
                 // a html message will be sent
                 if (content != null) {
-                    content.setSubType("alternative");
+                    content.setSubType("mixed");
                     MimeBodyPart htmlBodyPart = new MimeBodyPart();
                     htmlBodyPart.setContent(st.contentToString(nmsg), "text/html");
                     content.addBodyPart(htmlBodyPart);
                 } else {
-                    content = new MimeMultipart("alternative");
+                    content = new MimeMultipart("mixed");
                     MimeBodyPart htmlBodyPart = new MimeBodyPart();
                     htmlBodyPart.setContent(st.contentToString(nmsg), "text/html");
                     content.addBodyPart(htmlBodyPart);
@@ -235,7 +235,7 @@
             } catch (Exception ex) {
                 // no xml document - plain text used now
                 if (content != null) {
-                    content.setSubType("alternative");
+                    content.setSubType("mixed");
                     MimeBodyPart textBodyPart = new MimeBodyPart();
                     textBodyPart.setContent(st.contentToString(nmsg), "text/plain");
                     content.addBodyPart(textBodyPart);



Mime
View raw message