[CalendarServer-changes] [7819] CalendarServer/trunk/twistedcaldav/mail.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Jul 21 15:31:40 PDT 2011


Revision: 7819
          http://trac.macosforge.org/projects/calendarserver/changeset/7819
Author:   sagen at apple.com
Date:     2011-07-21 15:31:40 -0700 (Thu, 21 Jul 2011)
Log Message:
-----------
Use as_string() rather than str() on email message to strip out the envelope header, plus correct the linebreaks in forwarded replies.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/mail.py

Modified: CalendarServer/trunk/twistedcaldav/mail.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/mail.py	2011-07-21 18:28:12 UTC (rev 7818)
+++ CalendarServer/trunk/twistedcaldav/mail.py	2011-07-21 22:31:40 UTC (rev 7819)
@@ -780,7 +780,10 @@
             msg["To"] = toAddr
             factory = ESMTPSenderFactory(
                 settings["Username"], settings["Password"],
-                fromAddr, toAddr, StringIO(str(msg)), deferred,
+                fromAddr, toAddr,
+                # per http://trac.calendarserver.org/ticket/416 ...
+                StringIO(msg.as_string().replace("\r\n","\n")),
+                deferred,
                 contextFactory=contextFactory,
                 requireAuthentication=False,
                 requireTransportSecurity=settings["UseSSL"],
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110721/6e9df681/attachment.html>


More information about the calendarserver-changes mailing list