Skip to main content

Install

Add to your mix.exs dependencies:
def deps do
  [
    {:sendkit, "~> 1.0"}
  ]
end
Then run:
mix deps.get

Send email

client = SendKit.new("sk_your_api_key")

{:ok, %{"id" => id}} =
  SendKit.Emails.send(client, %{
    from: "Your Name <you@yourdomain.com>",
    to: ["recipient@example.com"],
    subject: "Hello from SendKit",
    html: "<h1>Welcome!</h1><p>Your first email with SendKit.</p>"
  })

IO.puts("Email sent: #{id}")