[CalendarServer-changes] [2823] CalendarServer/branches/users/sagen/mailgateway-implicit-2745/ twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 14 11:14:57 PDT 2008
Revision: 2823
http://trac.macosforge.org/projects/calendarserver/changeset/2823
Author: sagen at apple.com
Date: 2008-08-14 11:14:57 -0700 (Thu, 14 Aug 2008)
Log Message:
-----------
Using a smaller image in the invites so we don't lose the ical attachment in DSN failures
Modified Paths:
--------------
CalendarServer/branches/users/sagen/mailgateway-implicit-2745/twistedcaldav/mail.py
Added Paths:
-----------
CalendarServer/branches/users/sagen/mailgateway-implicit-2745/twistedcaldav/images/mail/ical.jpg
Added: CalendarServer/branches/users/sagen/mailgateway-implicit-2745/twistedcaldav/images/mail/ical.jpg
===================================================================
(Binary files differ)
Property changes on: CalendarServer/branches/users/sagen/mailgateway-implicit-2745/twistedcaldav/images/mail/ical.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: CalendarServer/branches/users/sagen/mailgateway-implicit-2745/twistedcaldav/mail.py
===================================================================
--- CalendarServer/branches/users/sagen/mailgateway-implicit-2745/twistedcaldav/mail.py 2008-08-14 17:15:56 UTC (rev 2822)
+++ CalendarServer/branches/users/sagen/mailgateway-implicit-2745/twistedcaldav/mail.py 2008-08-14 18:14:57 UTC (rev 2823)
@@ -677,14 +677,6 @@
msgId = messageid()
msg["Message-ID"] = msgId
- # the icalendar attachment (putting this first because if we get a
- # DSN failure in response, having this attachment in this position
- # seems to increase the chance we will get it back in the DSN).
- msgIcal = MIMEText(str(calendar), "calendar", "UTF-8")
- msgIcal.add_header("Content-Disposition",
- "attachment;filename=invitation.ics")
- msg.attach(msgIcal)
-
msgAlt = MIMEMultipart("alternative")
msg.attach(msgAlt)
@@ -698,7 +690,7 @@
msgAlt.attach(msgHtmlRelated)
htmlText = u"""
<html><body><div>
-<img src="cid:icalserver.png">
+<img src="cid:ical.jpg">
%s
</div></body></html>
""" % plainText
@@ -706,7 +698,7 @@
msgHtmlRelated.attach(msgHtml)
# an image for html version
- imageName = "icalserver.png"
+ imageName = "ical.jpg"
imageFile = open(os.path.join(os.path.dirname(__file__),
"images", "mail", imageName))
msgImage = MIMEImage(imageFile.read(),
@@ -718,6 +710,12 @@
(imageName,))
msgHtmlRelated.attach(msgImage)
+ # the icalendar attachment
+ msgIcal = MIMEText(str(calendar), "calendar", "UTF-8")
+ msgIcal.add_header("Content-Disposition",
+ "attachment;filename=invitation.ics")
+ msg.attach(msgIcal)
+
return msgId, msg.as_string()
def _generateCalendarSummary(self, calendar, organizer):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080814/4e9b37fb/attachment-0001.html
More information about the calendarserver-changes
mailing list