Sendio.Domains (sendio v1.1.0)

Manage domains in Sendio.

Summary

Types

What a domain does, Resend-style: :sending and/or :receiving set to "enabled" or "disabled".

Functions

Gets a domain given an ID.

Lists all domains.

Removes a domain. Caution: This can't be undone!

Begins the verification process for a domain.

Types

Link to this type

capabilities()

@type capabilities() :: %{
  optional(:sending) => String.t(),
  optional(:receiving) => String.t()
}

What a domain does, Resend-style: :sending and/or :receiving set to "enabled" or "disabled".

Sending is always on; sending: "disabled" is rejected with a 422.

Functions

Link to this function

create(client \\ Sendio.client(), opts)

Creates a new domain.

Parameter options:

  • :name - The domain name (required)
  • :region - Region to deliver emails from, one of: ["us-east-1", "eu-west-1", "sa-east-1"]
  • :capabilities - capabilities/0. %{receiving: "enabled"} also receives email on the domain (send.io then requires its MX record). Sending can't be disabled (422).

Example

Sendio.Domains.create(name: "example.com", capabilities: %{receiving: "enabled"})
Link to this function

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

Gets a domain given an ID.

Link to this function

list(client \\ Sendio.client())

Lists all domains.

Link to this function

remove(client \\ Sendio.client(), domain_id)

Removes a domain. Caution: This can't be undone!

Link to this function

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

Updates a domain.

Options

  • :click_tracking - Enable click tracking for this domain
  • :open_tracking - Enable open tracking for this domain
  • :tls - TLS setting: "opportunistic" (default) or "enforced"
  • :capabilities - capabilities/0. %{receiving: "disabled"} turns receiving off: send.io stops accepting email for the domain and no longer requires its MX record, so remove that record from your DNS. %{receiving: "enabled"} turns it back on and asks for the domain's MX record (publish it to start receiving email). Sending can't be disabled (422).

Example

Sendio.Domains.update(domain_id, capabilities: %{receiving: "disabled"})
Link to this function

verify(client \\ Sendio.client(), domain_id)

Begins the verification process for a domain.