I am using
frappe.sendmail to send calendar invitation emails. The aim is to get the calendar event automatically added to the recipient’s calendar. I am following
https://docs.cronofy.com/developers/smart-invites/sending/ to achieve that.
I am facing a couple of issues :-
I need to set the attachment’s
text/calendarand when I do that, frappe.sendmail uses
MimeTextthat messes up the newline characters in the original calendar text (iCalendar). The relevant code seems to be
https://github.com/frappe/frappe/blob/76ee35f8651bdbc48858f27efab2961537a72a10/frappe/email/email_body.py#L329. Is there a way to override this ?
Is there a way to add custom headers to an email attachment ? I need to customise the headers to match the above document.