我想在同一个日历上创建多个活动并将这些活动的邀请发送给人们,以便他们可以回复是,否,可能 (需要RSVP按钮) 它应该在谷歌地图上显示地址
这是我的代码
ical = Icalendar::Calendar.new
#ical.custom_property("X-MS-OLK-FORCEINSPECTOROPEN", "TRUE")
ical.timezone.tzid = "UTC"
email_one = 'example@gmail.com'
e = Icalendar::Event.new
e.dtstart = DateTime.civil(2015, 8, 4, 8, 30)
e.dtend = DateTime.civil(2015, 8, 4, 9, 30)
e.organizer = %W(mailto:#{email_one})
e.uid = "111"
ve.location ="my location"
#e.RECURRENCE-ID()
ical.append_custom_property("METHOD", "REQUEST")
e.summary = "Please Confirm Meeting"
ical.add_event(e)
ical.publish
ical.to_ical
attendee_params = { "CUTYPE" => "INDIVIDUAL",
"ROLE" => "REQ-PARTICIPANT",
"PARTSTAT" => "NEEDS-ACTION",
"RSVP" => "TRUE",
"CN" => "Firstname Lastname",
"X-NUM-GUESTS" => "1" }
attendee_value = Icalendar::Values::Text.new("MAILTO:example@example.com", attendee_params)
ical.append_custom_property("ATTENDEE", attendee_value)
mail.attachments['appointment.ics'] = { mime_type: 'application/ics', content: ical.to_ical }
mail(:to => email_one, :subject => "hello" , :from => "example@gmail.com")
提前致谢