-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Summary
Currently, Devpush supports only a single email delivery vendor — Resend — for transactional notifications. While related to #14 and the recent PR #17 introduced SMTP support, that approach, while universal, is not necessarily the fastest or most reliable option. Many production environments prefer native API integrations with providers such as Mailgun, Postmark, SendGrid, or AWS SES, which offer better performance, tracking, and delivery guarantees.
Problem
- The current implementation is tightly coupled to a single provider.
- SMTP, although standard, introduces latency, deliverability issues, and limited error visibility.
- Importing full SDKs or dependency sets for each vendor would unnecessarily bloat the stack.
Proposed Solutions
Option A: Pluggable Email Transport System
Introduce a lightweight plugin or provider system where each transactional email service can be implemented as a separate module following a shared interface (e.g., EmailTransport). This would allow easy extension or community-contributed providers without bloating the core codebase.
Option B: Unified Transport Abstraction (API-based)
Many vendors expose simple HTTP/JSON APIs that can be triggered with a curl call. Devpush could introduce a standardized “transport” config (e.g., RESEND, MAILGUN, POSTMARK, etc.) and map each to a predefined API endpoint + payload format. Responses could be normalized into a standard structure (e.g., { success, status, messageId }), enabling consistent behavior across vendors.
Example conceptual config:
EMAIL_TRANSPORT=postmark
EMAIL_API_KEY=...
EMAIL_FROM=...Benefits
- Improves reliability, speed, and deliverability.
- Enables Devpush to adapt to user preferences or compliance requirements (e.g., EU data region, local vendors).
- Keeps core lightweight while encouraging community contributions for additional providers.
Notes
This design would align well with Devpush’s modular architecture and allow self-hosted users to use their preferred transactional email service with minimal friction.