[CalendarServer-changes] [7870] 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:34:34 PDT 2011
Revision: 7870
http://trac.macosforge.org/projects/calendarserver/changeset/7870
Author: glyph at apple.com
Date: 2011-08-11 21:34:34 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
docstring for generateEmail.
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:34:22 UTC (rev 7869)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/twistedcaldav/mail.py 2011-08-12 04:34:34 UTC (rev 7870)
@@ -1115,6 +1115,51 @@
attendees, fromAddress, replyToAddress, toAddress,
language='en'):
+ """
+ Generate MIME text containing an iMIP invitation, cancellation, update
+ or reply.
+
+ @param inviteState: 'new', 'update', or 'reply'.
+
+ @type inviteState: C{str}
+
+ @param calendar: the iCalendar component to attach to the email.
+
+ @type calendar: L{twistedcaldav.ical.Component}
+
+ @param orgEmail: The email for the organizer, in C{localhost at domain}
+ format, or C{None} if the organizer has no email address.
+
+ @type orgEmail: C{str} or C{NoneType}
+
+ @param orgCN: Common name / display name for the organizer.
+
+ @param attendees: A C{list} of 2-C{tuple}s of (common name, email
+ address) similar to (orgEmail, orgCN).
+
+ @param fromAddress: the address to use in the C{From:} header of the
+ email.
+
+ @type fromAddress: C{str}
+
+ @param replyToAddress: the address to use in the C{Reply-To} header.
+
+ @type replyToAddress: C{str}
+
+ @param toAddress: the address to use in the C{To} header.
+
+ @type toAddress: C{str}
+
+ @param language: a 2-letter language code describing the target
+ language that the email should be generated in.
+
+ @type language: C{str}
+
+ @return: a 2-tuple of C{str}s: (message ID, message text). The message
+ ID is the value of the C{Message-ID} header, and the message text is
+ the full MIME message, ready for transport over SMTP.
+ """
+
details = self.getEventDetails(calendar, language=language)
canceled = (calendar.propertyValue("METHOD") == "CANCEL")
iconPath = self.getIconPath(details, canceled, language=language)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/a6ea7673/attachment.html>
More information about the calendarserver-changes
mailing list