Sendio.Emails (sendio v1.1.0)

Send emails via send.io.

Summary

Functions

Link to this function

cancel(client \\ Sendio.client(), email_id)

Cancels a scheduled email.

Link to this function

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

Gets an email given an ID.

Link to this function

get_attachment(client \\ Sendio.client(), email_id, attachment_id)

Gets a specific attachment for an email.

Link to this function

list(client \\ Sendio.client())

Lists all sent emails.

Link to this function

list_attachments(client \\ Sendio.client(), email_id)

Lists all attachments for an email.

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
  • :headers - Map of headers to add to the email with corresponding string values
  • :html - The HTML-formatted body of the email
  • :text - The text-formatted body of the email
  • :attachments - List of attachments to include in the email
  • :tags - List of tags to add to the email
  • :scheduled_at - Schedule the email to be sent at a specific time (ISO 8601 string)
  • :topic_id - The topic ID for subscription-based sending
  • :template - Template object with :id and optional :variables map for template-based emails

You must include one or both of the :html and :text options, unless using a template.

Request options (an optional keyword list after the parameters):

  • :idempotency_key - Sent as the Idempotency-Key header. Retrying with the same key returns the first result instead of sending the email again.

    Sendio.Emails.send(params, idempotency_key: "welcome-user/123") Sendio.Emails.send(client, params, idempotency_key: "welcome-user/123")

Link to this function

send(client, opts)

Link to this function

send(client, opts, request_opts)

Link to this function

send_batch(emails)

Sends a batch of emails (up to 100).

Takes a list of email parameter maps, each with the same options as send/2, and the same request options (:idempotency_key) as send/3.

Sendio.Emails.send_batch(emails, idempotency_key: "digest/2026-10-08")
Link to this function

send_batch(client, emails)

Link to this function

send_batch(client, emails, request_opts)

Link to this function

update(client \\ Sendio.client(), email_id, opts)

Updates a scheduled email.

Options

  • :scheduled_at - The new scheduled time (ISO 8601 string)