Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Send emails with Elixir

Before you start, you'll need:

  1. Install

    Install by adding resend to your list of dependencies in mix.exs:

    mix.exs
    def deps do
      [
        {:resend, "~> 0.4.0"}
      ]
    end
  2. Send email using HTML

    The easiest way to send an email is by using the html parameter.

    send.exs
    client = Resend.client(api_key: System.get_env("RESEND_API_KEY"))
    
    Resend.Emails.send(client, %{
      from: "Acme <onboarding@resend.dev>",
      to: ["delivered@resend.dev"],
      subject: "hello world",
      html: "<strong>it works!</strong>"
    })
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu