Repository navigation
fix: send forum watch notification recipients via BCC - #22
Merged
Merged
Conversation
Forum watch notifications put every watcher's address in `recipients`, which SendGrid renders as a single shared To header, exposing member email addresses to everyone on the notification. Watcher addresses now go only in `bcc`; `recipients` carries a single non-member address from NOTIFICATION_TO_EMAIL (default no-reply@topcoder.com), which is also removed from BCC to avoid SendGrid's duplicate-address rejection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
Forum watch notification emails exposed member email addresses.
ForumsWatchNotificationServiceput every authorized watcher's address in theexternal.action.emailrecipientsfield. The email service (bothemail-service-v6and legacytc-email-service) maps that field to SendGridto, and SendGrid sends a single message with one shared To header. Every watcher could see every other watcher's email address.Fix
bcc.recipients(the To header) holds a single non-member address from the newNOTIFICATION_TO_EMAILsetting, which defaults tono-reply@topcoder.com. This follows the pattern already used byleave-api-v6(LEAVE_REMINDER_TO_EMAIL).ccis never set.This is the only email publisher in forums-api, so it covers all forum notification emails. The email service already passes
bccthrough to SendGrid for v3 payloads, so it needs no changes.Config
NOTIFICATION_TO_EMAILis optional. If it is unset or blank,no-reply@topcoder.comis used. Set it to a non-member address.Tests
bccand only the no-reply address inrecipients.NOTIFICATION_TO_EMAILis respected and removed from BCC.pnpm lint,pnpm build, andjest: 22 suites passed, 3 DB-gated suites skipped (190 tests passed).Not addressed here
SendGrid caps a single personalization at 1000 total recipients (To + CC + BCC). This limit already applied to the old
tolist. Challenge forums with very large auto-watched registrant lists could exceed it and would need the BCC list split into batches.🤖 Generated with Claude Code