1
有一個問題:在 gdata.calendar.data.CalendarEventEntry.send_event_notifications 設置不工作(不發送了電子郵件):谷歌日曆API(Python)的send_event_notifications不發送電子郵件
event = gdata.calendar.data.CalendarEventEntry()
event.title = atom.data.Title(text='test event')
event.when.append(gdata.calendar.data.When(start=<start date>,end=<end date>))
event.who.append(gdata.calendar.data.EventWho(email='[email protected]',rel='http:// schemas.google.com/g/2005#event.attendee'))
event.who.append(gdata.calendar.data.EventWho(email='[email protected]',rel='http:// schemas.google.com/g/2005#event.organizer'))
event.send_event_notifications = gdata.calendar.data.SendEventNotificationsProperty(value='true')
new_event = client.InsertEvent(event)
此代碼設置成功後在組織者的日曆事件,但 客人沒有收到電子郵件...如果我打印出new_event中, 「sendEventNotifications」設置不顯示出來:
<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom"><ns1:sendEventNotifications value="true" xmlns:ns1="http://schemas.google.com/gCal/2005/" /><ns1:who email="[email protected]" rel="http://schemas.google.com/g/2005#event.attendee" xmlns:ns1="http://schemas.google.com/g/2005" /><ns1:who email="[email protected]" rel="http://schemas.google.com/g/2005#event.organizer" xmlns:ns1="http://schemas.google.com/g/2005" /><ns0:title>test event</ns0:title><ns1:when endTime="2011-08-23T10:00:00" startTime="2011-08-23T09:00:00" xmlns:ns1="http://schemas.google.com/g/2005"></ns1:when></ns0:entry>
發生了什麼事情的任何線索? 謝謝! 中號