0

I am trying to attach ICS files to emails sent via Django that when received includes the option to Accept, Tentative, Decline, Propose New Time in Outlook.

meeting-response

Currently, I am able to attach the ICS file to the email however it is not providing the options I stated above.

ics attachment

Below is how I am handling the ICS file, attaching it, and sending the email:

    #OPEN 'invite.ics' write generated ICS to file
    f = open(os.path.dirname(os.path.realpath(__file__)) + '/attachments/invite.ics', 'w')
    f.write(ical)
    f.close()

    #COMPOSE EMAIL
    msg = EmailMultiAlternatives(subject, description, fro, attendees)


    #Attach ICS file 
    msg.attach_file(os.path.dirname(os.path.realpath(__file__)) + '/attachments/invite.ics')

    #for HTML email template 
    msg.attach_alternative(html_message, "text/html")
    msg.send()

1 Answers1

0

You seem to be missing a proper content-type with a METHOD indicating the type of iTIP message. See Multipart email with text and calendar: Outlook doesn't recognize ics

Arnaud Quillaud
  • 4,420
  • 1
  • 12
  • 8