Raised when email delivery fails.
Types
:adapter_failure— the Swoosh adapter returned an error (retryable):rendering_failed— HEEx or CSS-inlining pipeline failed:preflight_rejected— suppression or rate-limit check blocked the send:serialization_failed— message could not be serialized for the adapter
Per-kind Fields
:delivery_id— binary reference to the failed%Mailglass.Delivery{}record when available (lands in Phase 2).nilwhen the failure occurred before the delivery row was persisted.
See Mailglass.Error for the shared contract and docs/api_stability.md
for the locked :type atom set.
Summary
Functions
Returns the closed set of valid :type atoms. Tested against docs/api_stability.md.
Build a Mailglass.SendError struct.
Types
@type t() :: %Mailglass.SendError{ __exception__: true, cause: Exception.t() | nil, context: %{required(atom()) => term()}, delivery_id: binary() | nil, message: String.t(), type: :adapter_failure | :rendering_failed | :preflight_rejected | :serialization_failed }
Functions
@spec __types__() :: [atom()]
Returns the closed set of valid :type atoms. Tested against docs/api_stability.md.
Build a Mailglass.SendError struct.
Options
:cause— an underlying exception to wrap (kept out of JSON output).:context— a map of non-PII metadata about the failure.:delivery_id— the%Mailglass.Delivery{}id when available.