有问题: gdata.calendar.data.CalendarEventEntry.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='gue...@gmail.com',rel='http:// schemas.google.com/g/2005#event.attendee'))
event.who.append(gdata.calendar.data.EventWho(email='organi...@gmail.com',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="gue...@gmail.com" rel="http://schemas.google.com/g/2005#event.attendee" xmlns:ns1="http://schemas.google.com/g/2005" /><ns1:who email="organi...@gmail.com" 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>
有关正在发生的事情的任何线索? 谢谢! M
答案 0 :(得分:1)
好的,这是Alain从Google发布的解决方案:
Calendar XML命名空间格式中存在一个错误 在存储库中修复:
http://code.google.com/p/gdata-python-client/source/detail?spec=svnff ...
请使用存储库版本而不是版本,因为有很多修复程序 在之前推入存储库: http://code.google.com/p/gdata-python-client/source/checkout
谢谢,阿兰!