Resend.Email (resend v0.3.0)

Send emails via Resend.

Link to this section Summary

Link to this section Types

@type t() :: %Resend.Email{
  bcc: [String.t()] | nil,
  cc: [String.t()] | nil,
  created_at: DateTime.t() | nil,
  from: String.t() | nil,
  html: String.t() | nil,
  id: String.t(),
  last_event: String.t() | nil,
  reply_to: String.t() | nil,
  subject: String.t() | nil,
  text: String.t() | nil,
  to: [String.t()] | nil
}

Link to this section Functions

Link to this function

get(client \\ Resend.client(), email_id)

Link to this function

send(client \\ Resend.client(), opts)

@spec send(Resend.Client.t(), map()) :: Resend.Client.response(t())

Sends an email given a map of parameters.

Parameter options:

  • :to - Recipient email address (required)
  • :from - Sender email address (required)
  • :cc - Additional email addresses to copy, may be a single address or a list of addresses
  • :bcc - Additional email addresses to blind-copy, may be a single address or a list of addresses
  • :reply_to - Specify the email that recipients will reply to
  • :subject - Subject line of the email
  • :html - The HTML-formatted body of the email
  • :text - The text-formatted body of the email

You are required to include one or both of the :html and :text options.