How to get ics calendar invitation to automatically add to calendar

You need to consider three points in order to add events automatically: Email Header iCalendar Method ATTENDEE information the “VEVENT” calendar component Email Header In order to get the email client to parse correctly the attached .ics file, you should add the scheduling method and MIME information to the email headers. This is specified by … Read more

Encoding newlines in iCal files

OK, looks like I’m answering my own question. The correct way to do it is to use “\n” for line breaks. Outlook did not recognize this because I had “ENCODING=quoted-printable” on the description. Once I removed that, Outlook displayed the new lines correctly. Also, to get the file to open correctly in Apple iCal, you … Read more

How can I use PHP to dynamically publish an ical file to be read by Google Calendar?

This should be very simple if Google Calendar does not require the *.ics-extension (which will require some URL rewriting in the server). $ical = “BEGIN:VCALENDAR VERSION:2.0 PRODID:-//hacksw/handcal//NONSGML v1.0//EN BEGIN:VEVENT UID:” . md5(uniqid(mt_rand(), true)) . “@yourhost.test DTSTAMP:” . gmdate(‘Ymd’).’T’. gmdate(‘His’) . “Z DTSTART:19970714T170000Z DTEND:19970715T035959Z SUMMARY:Bastille Day Party END:VEVENT END:VCALENDAR”; //set correct content-type-header header(‘Content-type: text/calendar; charset=utf-8’); header(‘Content-Disposition: … Read more

Creating iCal Files in c#

I use DDay.Ical, its good stuff. Has the ability to open up an ical file and get its data in a nice object model. It says beta, but it works great for us. Edit Nov 2016 This library has been deprecated, but was picked up and re-released as iCal.NET by another dev. Notes about the … Read more

Sending Meeting Invitations With Python

below is what worked for me sending invites via python over gmail (worked with google calendar, outlook and outlook.com (live/hotmail): import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email.Utils import COMMASPACE, formatdate from email import Encoders import os,datetime CRLF = “\r\n” login = “[email protected]” password = “yourpassword” attendees … Read more

Parsing files (ics/ icalendar) using Python

The icalendar package looks nice. For instance, to write a file: from icalendar import Calendar, Event from datetime import datetime from pytz import UTC # timezone cal = Calendar() cal.add(‘prodid’, ‘-//My calendar product//mxm.dk//’) cal.add(‘version’, ‘2.0’) event = Event() event.add(‘summary’, ‘Python meeting about calendaring’) event.add(‘dtstart’, datetime(2005,4,4,8,0,0,tzinfo=UTC)) event.add(‘dtend’, datetime(2005,4,4,10,0,0,tzinfo=UTC)) event.add(‘dtstamp’, datetime(2005,4,4,0,10,0,tzinfo=UTC)) event[‘uid’] = ‘20050115T101010/[email protected]’ event.add(‘priority’, 5) cal.add_component(event) … Read more

Multipart email with text and calendar: Outlook doesn’t recognize ics

You are missing the iTIP method, both in the content-type: Content-Type: text/calendar; charset=”utf-8″; method=REQUEST and as a VCALENDAR property as well: BEGIN:VCALENDAR VERSION:2.0 METHOD:REQUEST PRODID:-//GourmetPortal//NONSGML rr//DE The method might be PUBLISH or REQUEST (in which case you also miss some ATTENDEE property). Then, some clients are ignoring iMIP in multipart/alternative and are looking only as … Read more