feat(email): Integrate LeadMail API for transactional emails
Some checks failed
Lock Threads / action (push) Has been cancelled

Replace SMTP with LeadMail API service for sending system transactional emails (password resets, invitations, notifications). LeadMail provides built-in email verification via Verifalia and async queue-based sending.

Configuration:
- Set LEADMAIL_API_TOKEN and LEADMAIL_API_URL in .env
- Falls back to SMTP if LeadMail token not present
- Works via custom ActionMailer delivery method (stable across upstream merges)

Includes:
- LeadmailDelivery class with full spec coverage
- Support for multipart messages, attachments, CC/BCC
- Error handling and logging with message tracking
- Documentation in docs/LEADMAIL_INTEGRATION.md
This commit is contained in:
netlas
2026-04-21 22:51:02 +03:00
parent ddc4c916a4
commit 52988dea5b
5 changed files with 366 additions and 4 deletions

View File

@@ -95,6 +95,11 @@ SMTP_OPENSSL_VERIFY_MODE=peer
# SMTP_OPEN_TIMEOUT
# SMTP_READ_TIMEOUT
# LeadMail API (alternative to SMTP for transactional emails)
# If LEADMAIL_API_TOKEN is set, it takes precedence over SMTP configuration
# LEADMAIL_API_TOKEN=lm_your_token_here
# LEADMAIL_API_URL=https://mail.leadmagnet.dev/api/v1
# Mail Incoming
# This is the domain set for the reply emails when conversation continuity is enabled
MAILER_INBOUND_EMAIL_DOMAIN=