Lettermint.Messages (Lettermint v2.0.0)

Copy Markdown View Source

Sent and received messages. Needs :team_token; reschedule/4 and cancel/3 also accept the sending token when no team token is configured.

Every function takes the options timeout: (milliseconds) last.

Summary

Functions

Cancels a scheduled message. Uses the team token when configured, otherwise the sending token.

Lists the events of a message, one page at a time.

Streams every message, following next_cursor. Raises the error of a failed page request.

Streams every event of a message, following next_cursor. Raises the error of a failed page request.

Releases one quarantined inbound message for webhook delivery. Options: :idempotency_key and :timeout.

Moves a scheduled message to another delivery time. Uses the team token when configured, otherwise the sending token.

Types

result(value)

@type result(value) :: {:ok, value} | {:error, Lettermint.Error.t()}

Functions

cancel(client, message_id, options \\ [])

Cancels a scheduled message. Uses the team token when configured, otherwise the sending token.

events(client, message_id, query \\ %{}, options \\ [])

Lists the events of a message, one page at a time.

html(client, message_id, options \\ [])

@spec html(Lettermint.Client.t(), String.t(), keyword()) :: result(String.t())

The HTML body.

iterate(client, query \\ %{}, options \\ [])

Streams every message, following next_cursor. Raises the error of a failed page request.

iterate_events(client, message_id, query \\ %{}, options \\ [])

Streams every event of a message, following next_cursor. Raises the error of a failed page request.

list(client, query \\ %{}, options \\ [])

Lists messages, one page at a time. query: Lettermint.Types.ListMessagesQuery.t/0.

process(client, message_id, options \\ [])

Releases one quarantined inbound message for webhook delivery. Options: :idempotency_key and :timeout.

reschedule(client, message_id, body, options \\ [])

Moves a scheduled message to another delivery time. Uses the team token when configured, otherwise the sending token.

retrieve(client, message_id, options \\ [])

Retrieves a message.

source(client, message_id, options \\ [])

@spec source(Lettermint.Client.t(), String.t(), keyword()) :: result(String.t())

The raw RFC 822 source.

text(client, message_id, options \\ [])

@spec text(Lettermint.Client.t(), String.t(), keyword()) :: result(String.t())

The plain-text body.