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]

Phoenix

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

Step 1

Install the package

Add the official Elixir client to your Phoenix project.

bash
{:reloop, "~> 0.1.0"}

Step 2

Set your API key

Create a free Reloop account, copy your API key, and add it to your Phoenix environment.

Get an API key free →
bash
RELOOP_API_KEY="re_xxxxxxxx"

Step 3

Send email from Phoenix

Use this Phoenix snippet to send your first message. Works with Controllers · LiveView · OTP.

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

Send with Phoenix.

Get an API key and ship transactional email from Phoenix using the official Elixir SDK.