Skip to content

feat: unified email senders with SMTP support#2852

Open
baderdean wants to merge 4 commits into
mainfrom
feat/unified-senders
Open

feat: unified email senders with SMTP support#2852
baderdean wants to merge 4 commits into
mainfrom
feat/unified-senders

Conversation

@baderdean

Copy link
Copy Markdown
Member

Summary

Adds SMTP sender management to the leadminer platform, enabling users to configure custom SMTP servers for sending emails alongside the existing OAuth-based sending.

Changes

Backend:

  • New SMTP senders controller with full CRUD, test connection, and autodetect
  • PgSmtpSenders data access layer for the smtp_senders table
  • Routes wired into the app (/api/smtp-senders)
  • Validation schemas for SMTP sender operations

Frontend:

  • EmailSenderManagement component for managing email senders (IMAP + SMTP)
  • AddEmailSenderDialog for adding new SMTP senders
  • smtp-senders Pinia store
  • smtp-senders.ts TypeScript types
  • Updated campaigns page with aligned sender buttons (email + SMS)
  • Auto-regenerate SMTP senders from existing IMAP sources

Database:

  • Migration: 20260530120000_add_smtp_senders.sql — creates the smtp_senders table

Auto-sync:

  • When an OAuth mining source is created, an SMTP sender is automatically backfilled from existing credentials

Closes #<issue_number> (if applicable)

…anel

Move both action buttons up to the panel header so they sit on the same
row, regardless of which filter tab is active. Each management component
now accepts a hideAddButton prop and exposes openAddDialog so the page
can drive the dialog from outside.
Insert a stub smtp_sender row for each Google / Azure entry in
mining_sources so users who connected an OAuth source before the
unified-senders feature see their account in the email senders list
without having to re-add it manually.

The oauth_refresh_token is left NULL; the backend resolves the token
from the linked mining_sources row (via mining_source_email) at send
time, so the backfill needs no access to the vault key.
The Start Mining button was disabled when no email folders were
selected, even when Google Contacts sync was enabled. Now the button
stays enabled and startMiningBoxes() proceeds when googleContactsSyncEnabled
is true, allowing contacts-only mining without folder selection.
@baderdean baderdean force-pushed the feat/unified-senders branch from b756c5c to d2d0e93 Compare June 22, 2026 15:46
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