Phoenix SDK
HTTP client is Pigeon.Client.send_email/2 if you are not using Swoosh.
github.com/pigeonfs/pigeon-phoenix
All SDK libraries
API reference
Install
Elixir
def deps do [{:pigeon_client, github: "pigeonfs/pigeon-phoenix"}] end
Send an email
Elixir
config :my_app, MyApp.Mailer, adapter: Swoosh.Adapters.Pigeon, api_key: System.get_env("PIGEON_API_KEY"), base_url: System.get_env("PIGEON_BASE_URL") || "http://localhost:4005" import Swoosh.Email new() |> from({"Ada", "ada@yourdomain.com"}) |> to("person@example.com") |> subject("Hello") |> html_body("<p>Hello</p>") |> MyApp.Mailer.deliver()