Backport sendgrid fixes to 8-31-stable branch
In support of https://gitlab.com/gitlab-org/release/tasks/-/issues/1385
This MR backports the following three into the 8-31-stable branch:
This will form the v8.31.2 release for workhorse, to be included in the next non-security release of GitLab 13.0
Edited by Nick Thomas