python - Google Calendar API (Python) send_event_notifications 不发送电子邮件

标签 python api calendar gdata

遇到问题: 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> 

有发生什么事的线索吗? 谢谢! 中号

最佳答案

好的,这是 Alain 从 Google 发布的解决方案:

日历 XML 命名空间格式存在错误,已修复 已在存储库中修复:

http://code.google.com/p/gdata-python-client/source/detail?spec=svnff ...

请使用存储库版本而不是发行版,因为许多修复都是如此 之前推送到存储库中: http://code.google.com/p/gdata-python-client/source/checkout

谢谢,阿兰!

关于python - Google Calendar API (Python) send_event_notifications 不发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7152821/

相关文章:

python - 从 github 项目检索最新的提交修订号

c# - 将 C# 对象转换为 Json 对象

java - 如何将代码包含在函数中

C - 如何在 linux 中使用 API 库

Java 日历 'getTimeInMillis()' 导致所有 'isSet' 字段为真

python - tox.ini 的 Python tox 文档在哪里 [foo :bar] section inheriting from [foo]?

python - 按类名查找命令不起作用

python - Ipython 笔记本 : Elegant way of turning off part of cells?

calendar - 为什么 EWS 托管 API SyncFolderItems 不返回定期约会

.net - 是否有可能使日期数据类型接受一个月的13和所有月份的30?