-
Notifications
You must be signed in to change notification settings - Fork 619
Custom Header for Attachments #250
Copy link
Copy link
Closed
Labels
difficulty: unknown or n/afix is unknown in difficultyfix is unknown in difficultystatus: help wantedrequesting help from the communityrequesting help from the communitytype: non-library issueAPI issue not solvable via the SDKAPI issue not solvable via the SDK
Metadata
Metadata
Assignees
Labels
difficulty: unknown or n/afix is unknown in difficultyfix is unknown in difficultystatus: help wantedrequesting help from the communityrequesting help from the communitytype: non-library issueAPI issue not solvable via the SDKAPI issue not solvable via the SDK
I'm having an issue with needing to add custom headers for attachments to an email. I'm generating and attaching calendar appointments (meeting requests) and sending them to the users of my web application. It works perfectly for Gmail users. However, for those who are using Outlook, it does not behave as expected. After some research (and finding a related issue on the nodejs Sendgrid library) it appears that Outlook expects something additional in the header with the attachment. This is the header generated by Outlook for a meeting invite:
Content-Type: text/calendar; charset="utf-8"; method=REQUEST
and this is what I can get from SendGrid:
Content-Type: text/calendar; charset=utf-8; name="1187.ics"
It appears that, in order for me to get it to behave properly, I have to add method=REQUEST to the Content-Type header on the attachment alone. (Having the attachment name does not seem like it's going to be an issue.)
I'm currently using the v2 library. The nodejs ticket referenced above says this isn't going to be an issue with v3, but after looking at the (just published) v3 for php, I don't see the ability to change the header beyond setting the content type. Is this something that can be added or am I just missing the fact that this is doable in some other way? Thanks!