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

发布于 2024-11-30 14:55:47 字数 1992 浏览 2 评论 0原文

有一个问题: 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='[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> 

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

Having an issue: the
gdata.calendar.data.CalendarEventEntry.send_event_notifications
setting is not working (not sending out the emails):

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) 

This code successfully sets the event in the organizer's calendar, but
the guest does not receive the email... if I print out new_event, the
"sendEventNotifications" setting does show up:

<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> 

Any clue of what's happening?
Thanks!
M

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陪你搞怪i 2024-12-07 14:55:47

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

Calendar XML 命名空间格式中有一个错误,已修复
已在存储库中修复:

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

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

谢谢,阿兰!

Ok, here is the solution posted by Alain from Google:

There was a bug in the Calendar XML namespace formatting which has been
fixed in the repository:

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

Please use the repository version instead of the release as many fixes are
pushed in the repository before:
http://code.google.com/p/gdata-python-client/source/checkout

Thanks, Alain!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文