talira

Compose, deliver and test your emails easily in Elixir

open sourceMITfree

Swoosh is an Elixir library for composing, sending and testing email. A mailer module sends through one of many built-in adapters: SMTP and Sendmail, and transactional email services such as SendGrid, Mailgun, Postmark, Amazon SES, Brevo, Mandrill, Mailjet, SparkPost, Resend, Microsoft Graph and Gmail, with third-party adapters for more. It sends asynchronously, handles attachments, has test assertions and a local adapter for tests, lets you preview sent emails in the browser through a mailbox plug (in development, or in production behind your own protection), and emits telemetry events.

Problems it solves

  • send transactional email from my Phoenix app through SendGrid or Postmark
  • switch email providers in Elixir without rewriting my mailer code
  • preview the emails my Elixir app sends during development

Features

  • adapters for SMTP and 30+ email services, including SendGrid, Mailgun, Postmark and Amazon SES
  • async delivery and attachments
  • test assertions and a test adapter
  • mailbox preview in the browser
  • telemetry events

Alternatives

The same job

These do what Swoosh does.

  1. Bamboo Adapter-based email library for Elixir, with test helpers and Phoenix integration
  2. gen_smtp SMTP client and server library for Erlang

Compare Swoosh with the top 3