Skip to content

Custom Header for Attachments #250

@jfade

Description

@jfade

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions