feat(trust-portal): dedicated FROM env var for Trust Portal emails#2851
Merged
Conversation
Add RESEND_FROM_TRUST_PORTAL so Trust Portal access and NDA emails can ship from a brand-specific sender (e.g., noreply@mail.trust.inc), distinct from the generic system sender. triggerEmail() gets a new `trustPortal: true` flag that resolves the new env var, with graceful fallback to RESEND_FROM_SYSTEM so existing deploys keep working until the env var is set in Trigger.dev / Render. TrustEmailService (NDA signing, access granted, access reclaim, access request notification) now uses `trustPortal: true`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
claudfuen
pushed a commit
that referenced
this pull request
May 15, 2026
# [3.55.0](v3.54.3...v3.55.0) (2026-05-15) ### Features * **trust-portal:** dedicated FROM env var for trust portal emails ([#2851](#2851)) ([69b9157](69b9157))
Contributor
Author
|
🎉 This PR is included in version 3.55.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RESEND_FROM_TRUST_PORTALenv var so Trust Portal access and NDA emails can send from a brand-specific sender (e.g.Comp AI <noreply@mail.trust.inc>), distinct from the generic system sender.triggerEmail()gets a newtrustPortal: trueflag that resolvesRESEND_FROM_TRUST_PORTAL, with graceful fallback toRESEND_FROM_SYSTEMso prod keeps working until the env var is set in Trigger.dev / Render.TrustEmailService(NDA signing, access granted, access reclaim, access request notification) now passestrustPortal: trueinstead ofsystem: true.Files
apps/api/src/email/trigger-email.ts— adds optional flag + env resolutionapps/api/src/trust-portal/email.service.ts— 4 callers switch totrustPortal: trueapps/api/.env.example+ root.env.example— documents the new varDeploy steps (after merge)
Set
RESEND_FROM_TRUST_PORTALin:proj_zhioyrusqertqgafqgpjenv (this is where the email actually sends from)apps/api/.envif testing locallyValue being used:
Comp AI <noreply@mail.trust.inc>Pre-reqs in Resend:
mail.trust.incdomain verified (SPF, DKIM, DMARC green)If the env var isn't set, code falls back to
RESEND_FROM_SYSTEM— safe to merge before the env is configured.Test plan
npx turbo run typecheck --filter=@trycompai/api) — verified locally; pre-existing errors in unrelated modules onlyFrom:header isComp AI <noreply@mail.trust.inc>RESEND_FROM_SYSTEM🤖 Generated with Claude Code
Summary by cubic
Adds a dedicated
RESEND_FROM_TRUST_PORTALsender for Trust Portal emails (NDA, access flows) so they send from a brand-specific address (e.g.,Comp AI <noreply@mail.trust.inc>). Falls back toRESEND_FROM_SYSTEMif not set.New Features
RESEND_FROM_TRUST_PORTALenv var, with fallback toRESEND_FROM_SYSTEM.triggerEmail()supportstrustPortal: trueto resolve the new sender.TrustEmailServicenow passestrustPortal: truefor NDA and access emails.Migration
RESEND_FROM_TRUST_PORTALinTrigger.devandRender(and local.envif testing).RESEND_FROM_SYSTEMuntil configured.Written for commit 7ea0521. Summary will update on new commits.