What problem does it solve?
Litestar applications require a consistent, flexible way to send emails across development, testing, and production environments without rewriting code when switching email providers, eliminating vendor lock-in and test flakiness from real network calls.
Core Features & Use Cases
- Pluggable backend support: Natively supports SMTP, Resend, SendGrid, Mailgun, and SES backends, plus in-memory and console backends for local development and testing.
- Seamless Litestar integration: Auto-registers EmailService as a dependency via the Litestar plugin system, so it can be injected directly into handlers and services.
- Production-ready best practices: Includes guidance for background email sending via SAQ, secret sanitization, and testable email flows to avoid blocking request threads and leaking sensitive data.
- Use case example: Build a user onboarding flow that sends welcome emails via Resend in production, uses an in-memory backend for tests, and queues sends in the background to avoid p99 latency spikes.
Quick Start
Use the litestar-email skill to configure a Resend-backed email plugin for your Litestar app and send a test welcome email to a new user.