Feature: Member Email Broadcasting System #473
Labels
No labels
accessibility
api
auth.js
backend
copy
database
defect
dependencies
design
discussion
documentation
duplicate
enhancement
epic
feature
front-end
good first issue
help wanted
invalid
next.js
noscript
on hold
operations
optimization
postgresql
prisma
prototype
question
react
spike
stale
story
tailwind
vulnerability
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SSE/WebsiteTheSSEquel#473
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
SSE has no way to reach members via email for official club communications. Elections, constitutional amendments, event announcements, and emergencies require a reliable, officer-controlled broadcast tool with member consent (provided via Quest #2 — issue #474).
Proposed Solution
Add a Member Email Broadcast page to the officer dashboard. Officers compose a rich HTML email, pick a category, preview it, see a live recipient count, and send. A visually distinct emergency broadcast sends to all members regardless of their preferences.
UI —
/dashboard/email-broadcast(officer-only)Standard broadcast:
Elections|Amendments|Events|General AnnouncementsGET /api/email/broadcast/count)Emergency broadcast (separate section, red border):
SEND EMERGENCY EMAILbefore the Send button enablesAPI Routes
GET/api/email/broadcast/count?category=POST/api/email/broadcastPOST/api/email/broadcast/emergencyBroadcast logic (both routes):
Users joined toEmailPreferenceswhere the category flag istrueUserssendEmail()fromnext/lib/email/index.ts/profile/[id]?tab=quests(where the email consent quest lives)EmailBroadcastLogentry{ sent: N, failed: M }New Prisma model:
EmailPreferencesmodel lives in issue #474 (quests) — this feature depends on it being in place.Email Template
"Society of Software Engineers" <no-reply@sse.rit.edu>Alternatives Considered
Scope
In scope:
/dashboard/email-broadcastEmailBroadcastLogmodel + audit trailOut of scope:
Acceptance Criteria
EmailPreferencesflagsSEND EMERGENCY EMAIL, and sends to all usersEmailBroadcastLogrow{ sent: N, failed: M }is returned and surfaced to the officer after sendAdditional Context
EmailPreferencesmodel from issue #474 (Membership Quests)next/lib/email/index.ts+next/lib/email/smtp.tsnext/app/api/email/send/route.tsnext/lib/middlewares/