开发者

Google Calendar API (Python) send_event_notifications not sending emails

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='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) 

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

Any clue of what's happening? Thanks! M


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜