Very excited to be able to use #mutt for my gmail-based work email! (Our admin had disabled "less secure apps," so I needed oauthbearer authentication to be able to use mutt for IMAP access.)
Mischief managed. Just POST the message to https://www.googleapis.com/upload/gmail/v1/users/me/messages/send?uploadType=media with these headers...
Authorization: Bearer <access token>
Content-Length: <message size>
... and you're good to go.
arktos.social is a private Mastodon instance. Contact the administrator to request an account.