Sent Sendgrid messages with bin/mail send-test ... using subject/headers/attachments/html/to/cc.
I guess we can't wrap this in an OpaqueEnvelope because it needs that "Bearer" prefix?
I was thinking about this for the previous revision, too: won't this break the sending of very large attachments? I guess Phabricator is pretty good about not generating multi-gigabyte payloads, so in practice this probably isn't an issue.
Right. We could do some kind of addSensitiveHeader() mumbo-jumbo (or let you pass either an OpaqueEnvelope or a string) but we don't currently dump request headers anywhere.
With some caveats in T11767, we "should" never generate a very large attachment. I think sending large attachments via email is probably not a good thing -- if a use case exists, it would be better to put them in Files and link to them, I think? Maybe something weird will crop up eventually, but for now we only attach diff/patch files, and attempt to limit their size to something reasonable.
Is it worth noting somewhere that the V2 API uses a username and password to authenticate (and cannot use an API key) and the V3 API uses just an API key (and cannot use a username or password), and those are generated/managed in totally different parts of the Sendgrid UI? Maybe a note in the documentation?