feat(elections): transactional email delivery for voting tokens
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 33
- Forks
- 104
- Avg merge
- 12h 3m
- Merged PRs (30d)
- 10
Description
Summary
Send each voter their personalized voting link once an election opens, using a transactional email provider.
Part of #1933.
Requirements
- Integrate a transactional email provider (Postmark / Resend / SES) via Convex action
- Store provider credentials in Convex env, never in client code
- Email template with US-RSE branding, plain-text fallback, election title, opens/closes date, unique voting link
- Admin action: "Send invitations" — scheduled job that sends to all `invited` voters
- Rate-limit sends to stay within provider tier
- Handle bounces/complaints: mark voter as `bounced` with a reason in the audit log
- Admin action: "Resend to non-voters" (sends only to voters whose token has not been redeemed)
- Automated reminder 24 hours before close to non-voters (configurable, opt-out per election)
- Test mode: admin can send a sample email to their own address before bulk-sending
Context
- Epic: #1933
- Depends on voter roll import issue
Implementation notes
- Prefer Postmark or Resend for deliverability and simple webhook handling for bounces
- Email link: `https://elections.us-rse.org/vote/` — token is in the URL path, keep it out of query strings to avoid leaking into referer headers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing epic #1933 and the dependent voter roll import issue, then trace the election and voter data flow described in this issue. The work is done when the Convex action, provider integration, invitation and reminder flows, bounce handling, rate limiting, and admin test/resend actions satisfy all listed requirements and are covered by automated tests.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100