Resend
API client for Resend, the new email API for developers.
Send your first email in two steps:
# Configure your Resend API key
config :resend, Resend.Client, api_key: "re_1234567"# Send an email
Resend.Email.send(%{to: "me@example.com", from: "myapp@example.com", subject: "Hello!", text: "👋🏻"})View additional documentation at https://hexdocs.pm/resend.
Installation
Install by adding resend to your list of dependencies in mix.exs:
def deps do
[
{:resend, "~> 0.1.0"}
]
endTesting
By default, calls to Resend are mocked in tests. To send live emails while running the test suite, set the following environment variables:
RESEND_KEY="re_1234567" RECIPIENT_EMAIL="<to_email>" SENDER_EMAIL="<from_email>" mix test