feat(email): native Gmail API mail provider for GCP self-hosting#5736
Conversation
Adds Gmail as a fifth transactional mail provider (Resend → SES → SMTP → ACS → Gmail). GCP has no first-party SES/ACS equivalent, so the native Google path is the Gmail API: a service account with domain-wide delegation impersonates a Workspace sender (GMAIL_SENDER) and posts the raw RFC 822 message (built via nodemailer's MailComposer — full parity incl. attachments, replyTo, unsubscribe headers) to the media-upload messages.send endpoint. The Workspace SMTP relay alternative is documented against the existing SMTP provider.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The new provider uses a service account (
Reviewed by Cursor Bugbot for commit 193c834. Configure here. |
Greptile SummaryThis PR adds Gmail API support as a transactional email provider. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(email): review round 1 + audit harde..." | Re-trigger Greptile |
- a 2xx from Gmail with an empty/malformed body no longer surfaces as a send failure (the mailer's fallback chain would deliver the same email twice); covered by a regression test - normalize bare-LF line endings in html/text bodies to CRLF (RFC 822) before composing the raw message - add multi-recipient and text-only test cases
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 193c834. Configure here.
Summary
GMAIL_CREDENTIALS_JSON) impersonates a Workspace sender (GMAIL_SENDER) with thegmail.sendscopeMailComposer(already a dependency) and posted to themessages.sendmedia-upload endpoint (message/rfc822, up to ~35 MiB).env.example, helmvalues.yaml+values.schema.json, and a mail section invalues-gcp.yamlType of Change
Testing
helm lint+helm templatewith values-gcp.yaml render correctlyChecklist