Skip to content

Adding extra header values to HTTP request #1047

@FatherFil

Description

@FatherFil

The emails we send using SendGrid usually contain a lot of bona-fide links and this has occasionally tripped the security filters at SendGrid, resulting in our emails not being sent. Once we confirmed with SendGrid Security Team that our links are okay and not spam we were asked to include a special key in the header of our API requests.

After much to and fro between our dev team and the SendGrid support team, on how best to do this, and exactly why it would be bad practice to fork the official repo and mangle the code to add the key in manually, I wondered whether it was possible to add in the ability to push a new header key value pair into the base HTTP request in sendgrid\lib\BaseSendGridClientInterface.php

I'm happy to craft something and submit a pull request but I wanted to check first that:

  1. that's acceptable for this repo/package
  2. there isn't a function I'm missing that does this already

Many thanks,

Phil

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