> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendkit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Elixir

> Send emails from Elixir using the SendKit SDK.

<CardGroup cols={2}>
  <Card title="Source Code" icon="github" href="https://github.com/sendkitdev/sendkit-elixir">
    View on GitHub
  </Card>

  <Card title="Package" icon="box" href="https://hex.pm/packages/sendkit">
    View on Hex
  </Card>
</CardGroup>

## Install

Add to your `mix.exs` dependencies:

```elixir theme={null}
def deps do
  [
    {:sendkit, "~> 1.0"}
  ]
end
```

Then run:

```bash theme={null}
mix deps.get
```

## Send email

```elixir theme={null}
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}")
```
