SDKs
Elixir
Coming soonSend email from Elixir, with a Swoosh adapter for Phoenix apps.
Source codegithub.com/mail-craft/mailcraft-elixir
PackageNot on Hex yet
The Elixir SDK isn't released yet — this page shows its planned API. You can send from Elixir today by calling the REST API directly.
Install
mix.exs
defp deps do
[
{:mailcraft, "~> 0.1"}
]
endSend email
Send from a verified sender on one of your domains.
main.exs
mailcraft = MailCraft.Client.new(System.fetch_env!("MAILCRAFT_API_KEY"))
MailCraft.Emails.send(mailcraft,
from: "[email protected]",
to: ["[email protected]"],
subject: "Welcome!",
html: "<p>Thanks for signing up.</p>"
) Keep your API key in the MAILCRAFT_API_KEY environment variable, never in source control. Create one under Settings → API keys, scoped to just what this app needs.