Public preflight facade for suppression checks (SEND-04).
Thin wrapper over Mailglass.SuppressionStore.check/2 configured via:
config :mailglass, :suppression_store, Mailglass.SuppressionStore.Ecto # default
config :mailglass, :suppression_store, Mailglass.SuppressionStore.ETS # test-speedReturn shape
:okwhen the recipient is not suppressed{:error, %Mailglass.SuppressedError{type: scope}}on a suppression hit
Telemetry
Single-emit [:mailglass, :outbound, :suppression, :stop] with:
- Measurements:
%{duration_us: integer()} - Metadata:
%{hit: boolean(), tenant_id: String.t()}
No PII — neither address nor stream appears in metadata. Context
on the %SuppressedError{} carries tenant_id + stream only
(stream is enum-narrow, not recipient-identifying).
Summary
Functions
Pre-send suppression check. Returns :ok when allowed, {:error, %SuppressedError{}} when blocked.
Functions
@spec check_before_send(Mailglass.Message.t()) :: :ok | {:error, Mailglass.SuppressedError.t()}
Pre-send suppression check. Returns :ok when allowed, {:error, %SuppressedError{}} when blocked.
Extracts the primary recipient from msg.swoosh_email.to and delegates to the
configured SuppressionStore implementation.