[CalendarServer-changes] [7891] CalendarServer/branches/users/glyph/imip-and-admin-html/ twistedcaldav/mail.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 11 21:38:27 PDT 2011


Revision: 7891
          http://trac.macosforge.org/projects/calendarserver/changeset/7891
Author:   glyph at apple.com
Date:     2011-08-11 21:38:27 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
move MIME-construction and part rendering a little further apart

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py

Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py	2011-08-12 04:38:16 UTC (rev 7890)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py	2011-08-12 04:38:27 UTC (rev 7891)
@@ -1266,11 +1266,16 @@
 
         details.update(labels)
 
+        plainText = self.renderPlainText(
+            details, (orgCN, orgEmail), attendees, canceled
+        )
+        addIcon, htmlText = self.renderHTML(
+            details, (orgCN, orgEmail), attendees, canceled
+        )
+
         msgAlt = MIMEMultipart("alternative")
         msg.attach(msgAlt)
 
-        plainText = self.renderPlainText(details, (orgCN, orgEmail),
-                                         attendees, canceled)
         msgPlain = MIMEText(plainText.encode("UTF-8"), "plain", "UTF-8")
         msgAlt.attach(msgPlain)
 
@@ -1278,10 +1283,6 @@
         msgHtmlRelated = MIMEMultipart("related", type="text/html")
         msgAlt.attach(msgHtmlRelated)
 
-        addIcon, htmlText = self.renderHTML(
-            details, (orgCN, orgEmail), attendees, canceled
-        )
-
         msgHtml = MIMEText(htmlText.encode("UTF-8"), "html", "UTF-8")
         msgHtmlRelated.attach(msgHtml)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/d79207e6/attachment-0001.html>


More information about the calendarserver-changes mailing list