Skip to content

fix: make email sender addresses configurable via env vars - #97

Closed
VinneyJ wants to merge 10 commits into
main-stagingfrom
email-fix
Closed

VinneyJ wants to merge 10 commits into
main-stagingfrom
email-fix

Conversation

@VinneyJ

@VinneyJ VinneyJ commented Oct 7, 2026 •

Copy link
Copy Markdown

Summary

  • Email sending was broken because upstream hardcodes system@dub.co as the sender, which Resend rejects for non-dub.co deployments
  • Made all three from addresses (primary, notifications, marketing) and the replyTo fallback configurable via env vars, with the original dub.co values as fallbacks

Env vars to set in Vercel

Var Example value
EMAIL_FROM_PRIMARY Code for Africa <support@codeforafrica.org>
EMAIL_FROM_NOTIFICATIONS Code for Africa <support@codeforafrica.org>
EMAIL_FROM_MARKETING Code for Africa <support@codeforafrica.org>
EMAIL_REPLY_TO support@codeforafrica.org

Values must use a domain verified in your Resend account.

Files changed

  • packages/email/src/resend/constants.ts - from addresses read from env vars
  • packages/email/src/send-via-resend.ts - replyTo fallback reads from env var

Closes CodeForAfrica/infrastructure-as-code#133

VinneyJ and others added 10 commits August 21, 2026 15:16
fix: restore AWS S3 region for avatar upload (lost in revert of #70)
chore: migrate CFA Tinybird workspace from Classic to Forward
…rkflow

ci: add monthly upstream sync workflow
Upstream hardcodes dub.co sender addresses which Resend rejects for
non-dub.co deployments. Read from EMAIL_FROM_PRIMARY,
EMAIL_FROM_NOTIFICATIONS, EMAIL_FROM_MARKETING, and EMAIL_REPLY_TO
env vars with dub.co values as fallbacks.
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dub Ready Ready Preview Oct 7, 2026 6:47am UTC

Request Review

@kilemensi

Copy link
Copy Markdown
Member

Isn't this PR doing what #95 is doing?

@VinneyJ

VinneyJ commented Oct 13, 2026 •

Copy link
Copy Markdown
Author

Hello @nkasozi were you doing this same fix? let me know so we can settle on which one to close.

@nkasozi

nkasozi commented Oct 14, 2026

Copy link
Copy Markdown

@VinneyJ , closed mine. I see this PR has changes in github workflows mixed in...can you double check as to why those files are being mixed into this PR

@VinneyJ

VinneyJ commented Oct 14, 2026

Copy link
Copy Markdown
Author

Superseded by #98 — same fix on a clean branch with no unrelated files mixed in.

@VinneyJ VinneyJ closed this Oct 14, 2026

This branch was successfully deployed

1 active deployment
Preview — bf6b178f Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants