sendgrid-php
sendgrid-php copied to clipboard
Adding extra header values to HTTP request
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:
- that's acceptable for this repo/package
- there isn't a function I'm missing that does this already
Many thanks,
Phil