I am using icalendar gem in rails to render calendar in meeting invite when sending mail through rails application.
Here is my code to do that:
mails = mail(:from => "organizer@email.com",:to => "organizer@email.com,recipient@email.com",:subject => "subject") do |format|
format.html { render "my_content_partial" }
format.ics {
ical = Icalendar::Calendar.new
ical.custom_property("X-MS-OLK-FORCEINSPECTOROPEN", "TRUE")
e = Icalendar::Event.new
e.start = DateTime.parse(start_time)
e.start.icalendar_tzid="UTC"
e.end = DateTime.parse(end_time)
e.end.icalendar_tzid="UTC"
e.klass "PRIVATE"
e.organizer "organizer@email.com"
e.attendees ["mailto: my@email.com"]
e.summary "#{subject}" #builds the title of the meeting in calendar
e.custom_property("LOCATION", "my location")
ical.add_event(e)
ical.custom_property("METHOD", "REQUEST")
render :text => ical.to_ical
}
mails.deliver
The issue I am facing is that the email sent to the recipient@email.com contains calender in it but not showing in the organizer@email.com's email. Thanks in advance.