For the complete site index, see llms.txt. Docs index: llms-docs.txt. Marketing corpus: llms-full.txt. Docs corpus: llms-full-docs.txt. Prefer markdown URLs where available (append .md).. Product skill: skill.md. Pricing: pricing.md. Docs MCP: /docs/mcp. Site MCP: /mcp.

[Elixir SDK]

Send email from Phoenix

Send email from Phoenix controllers and LiveView with the Elixir client.

1

Install the Elixir package

bash
{:reloop, "~> 0.1.0"}
2

Send email from Phoenix

send_email.ex
1defmodule MyAppWeb.EmailController do
2 use MyAppWeb, :controller
3
4 def create(conn, %{"to" => to}) do
5 client = Reloop.client(api_key: System.get_env("RELOOP_API_KEY"))
6
7 case Reloop.Emails.send(client, %{
8 from: "Acme <onboarding@yourdomain.com>",
9 to: [to],
10 subject: "Hello from Phoenix",
11 html: "<strong>It works!</strong>"
12 }) do
13 {:ok, email} -> json(conn, %{id: email.id})
14 {:error, reason} -> conn |> put_status(500) |> json(%{error: inspect(reason)})
15 end
16 end
17end
3

GitHub, examples, and API reference

4

Need more help?

W: 320.0px180R20∠45.0°

Ready to send with Phoenix?
Let's talk.

3,000 free emails every month. Modern email infrastructure and deliverability built for developers.

Reloop