I am trying to send an iCalendar formatted ics file from App Engine using the App Engine mail API. This works great in GMail. However, Outlook doesn't recognise the file, and I believe the issue is that the content-type is set to "text/calendar" and not "text/calendar; method=REQUEST".
I have tried sending mail with telnet with and without "method=REQUEST" to find that Outlook only actions the ics file if this is included. I have checked the headers sent from App Engine, to find that they do not include method=REQUEST and that is why I believe this is the problem.
I have also seen other people report this issue here and here. There is a java solution to the first link, but having now gone through the App Engine mail api with a fine toothcomb I have so far been unable to set the content-type using Python.
I have tried overriding the EXTENSION_MIME_MAP dict:
mail.EXTENSION_MIME_MAP['ics'] = 'text/calendar; charset=utf-8; method=REQUEST;'
and setting the header myself:
message.headers = {'content-type': 'text/calendar; charset=utf-8; method=REQUEST;'}
Both were a long shot, and unsurprisingly, neither work.
So how can this be done?