Unicom360.Email.SendResult (Unicom360 v0.1.0)

Copy Markdown View Source

The result of Unicom360.Email.send/3 (canonical name EmailSendResult).

  • api_reference, message - from the envelope.
  • results - one Unicom360.Email.Result per recipient, in the gateway's order, which is not the request's order past the tenth recipient.
  • raw, extra - the JSON object, and the members this version does not model.

Summary

Functions

The results the gateway accepted (status exactly "ACKNOWLEDGED"), in response order.

The first result for address, or nil. Ignores case and surrounding white space.

Every other result (for example "Invalid email address"), in response order.

Types

t()

@type t() :: %Unicom360.Email.SendResult{
  api_reference: String.t() | nil,
  extra: map(),
  message: String.t() | nil,
  raw: map(),
  results: [Unicom360.Email.Result.t()]
}

Functions

accepted(send_result)

@spec accepted(t()) :: [Unicom360.Email.Result.t()]

The results the gateway accepted (status exactly "ACKNOWLEDGED"), in response order.

by_address(send_result, address)

@spec by_address(t(), String.t()) :: Unicom360.Email.Result.t() | nil

The first result for address, or nil. Ignores case and surrounding white space.

invalid(send_result)

@spec invalid(t()) :: [Unicom360.Email.Result.t()]

Every other result (for example "Invalid email address"), in response order.