Notix
Integrations

Email from Elixir and Phoenix through Notix.

Phoenix apps send through Swoosh, and Swoosh has an SMTP adapter, so the relay is the shortest path: your existing mailers keep working. There is no Elixir SDK; when you want the message id back or an idempotency key, call the JSON API with Req.

The send

Send an email from Elixir and Phoenix.

config/runtime.exs (needs the gen_smtp dependency)
config :my_app, MyApp.Mailer,
  adapter: Swoosh.Adapters.SMTP,
  relay: "smtp.usenotix.dev",
  port: 587,
  username: "notix",
  password: System.fetch_env!("NOTIX_API_KEY"),
  tls: :always,
  auth: :always

The from address must be on a domain you have verified in Notix. Step by step: the SMTP quickstart.

Environment

One API key, kept on the server.

Create an API key on the API keys page of the Notix console and store it as NOTIX_API_KEY in the release environment, read in config/runtime.exs. Read it only in code that runs on the server, never in anything shipped to a browser.

A Send only key is enough for code that only sends: if it leaks, it cannot read your contacts or delete a domain.

.env
NOTIX_API_KEY=notix_xxxxxxxxxxxx
NOTIX_WEBHOOK_SECRET=whsec_xxxxxxxxxxxx
FAQ

Questions, answered.

Is there a Notix Elixir library?
No. Notix publishes SDKs for TypeScript, Python and PHP. From Elixir, use Swoosh with the SMTP relay or the JSON API over HTTPS.
Which port should Swoosh use?
587 with STARTTLS, as in the sample, or 465 for implicit TLS. The username is always notix and the password is your API key.
Why is my send refused with a from-address error?
The from address must be on a domain you have verified in Notix. Add the domain in the console, publish the DNS records it shows, and wait for verification; until then, sends from that domain are refused.

The free plan does not ask for a card.

Send your first email in five minutes.

Verify a domain, copy an API key, make one call. The free plan does not ask for a card.