[seam-commits] Seam SVN: r11954 - branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jan 13 15:01:06 EST 2010


Author: norman.richards at jboss.com
Date: 2010-01-13 15:01:06 -0500 (Wed, 13 Jan 2010)
New Revision: 11954

Modified:
   branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIBody.java
Log:
JBSEAM-3906

Modified: branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIBody.java
===================================================================
--- branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIBody.java	2010-01-13 16:24:44 UTC (rev 11953)
+++ branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIBody.java	2010-01-13 20:01:06 UTC (rev 11954)
@@ -58,19 +58,20 @@
             {
                bodyPart = getHtmlBody(facesContext, body);
             }
-            
-            if (findMessage().getAttachments().size() > 0)
+         }
+         
+         if (findMessage().getAttachments().size() > 0)
+         {
+            MimeMultipart bodyRootMultipart = new MimeMultipart("related");
+            bodyRootMultipart.addBodyPart(bodyPart, 0);
+            for (MimeBodyPart attachment: findMessage().getAttachments())
             {
-               MimeMultipart bodyRootMultipart = new MimeMultipart("related");
-               bodyRootMultipart.addBodyPart(bodyPart, 0);
-               for (MimeBodyPart attachment: findMessage().getAttachments())
-               {
-                  bodyRootMultipart.addBodyPart(attachment);
-               }
-               bodyPart = new MimeBodyPart();
-               bodyPart.setContent(bodyRootMultipart);
+               bodyRootMultipart.addBodyPart(attachment);
             }
+            bodyPart = new MimeBodyPart();
+            bodyPart.setContent(bodyRootMultipart);
          }
+         
          getRootMultipart().addBodyPart(bodyPart, 0);
       }
       catch (MessagingException e)



More information about the seam-commits mailing list