Skip to content

Add per-list double opt-in confirmation flow - #5

Merged
sagnik11 merged 1 commit into
mainfrom
feat/implement-double-opt-in-confirmation-flow
May 4, 2026
Merged

Add per-list double opt-in confirmation flow#5
sagnik11 merged 1 commit into
mainfrom
feat/implement-double-opt-in-confirmation-flow

Conversation

@sagnik11

@sagnik11 sagnik11 commented May 4, 2026

Copy link
Copy Markdown
Member

TL;DR

Implements a per-list double opt-in feature that requires new contacts to confirm their subscription via an emailed link before they can receive campaigns. Adds environment variable configuration, list detail page UI controls, and comprehensive documentation.

What changed?

Configuration & Documentation

  • Added CONFIRMATION_FROM_EMAIL environment variable to .env.example for configuring the sender address of confirmation emails
  • Updated README.md with Double Opt-In section explaining setup, behavior, and user experience
  • Updated CHANGELOG.md and feature list to document the new double opt-in capability
  • Marked "Double opt-in" as completed in ROADMAP.md

Database & Data Structure

  • Extended ListInfo interface to include requireDoubleOptIn boolean flag
  • Added pending status to contact counts (alongside existing active, bounced, unsubscribed)
  • Updated TabStatus type to include 'pending' as a valid tab filter option

List Detail Page UI

  • Added toggle state management (togglingOptIn) for the double opt-in switch
  • Implemented handleToggleDoubleOptIn() function to toggle the feature on/off per list
  • Integrated double opt-in toggle into the list detail page header for easy access

Feature Behavior

  • New contacts added to a double opt-in enabled list are created with status = pending
  • Pending contacts receive a confirmation email and are excluded from campaign sends
  • Confirmation link points to /confirm/<token> with minimal confirmation page UI
  • Toggle behavior: affects only new contacts; existing contacts retain their status

Generated-By: PostHog Code
Task-Id: 7bd51f1e-5c03-4daf-9508-80f081e18784
@sagnik11
sagnik11 marked this pull request as ready for review May 4, 2026 05:26
@sagnik11
sagnik11 merged commit 70053a3 into main May 4, 2026
1 of 2 checks passed
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.

1 participant