DripDrop.Policy.SendingRules (DripDrop v0.1.0)

Copy Markdown View Source

Applies optional per-step and per-adapter sending controls.

DripDrop does not classify sequence messages into broad operating modes. Hosts opt into concrete rules such as recipient verification and daily sender-mailbox caps through step or adapter config.

Summary

Functions

Applies verified-recipient and sender daily-cap rules for a dispatch attempt.

Resolves the configured sender daily cap from step or adapter config.

Extracts the sender domain from a payload or template.

Extracts the sender mailbox from a payload.

Functions

check(context, payload, adapter)

@spec check(map(), map(), map()) ::
  :ok | {:skip, binary()} | {:defer, DateTime.t(), map()} | {:error, map()}

Applies verified-recipient and sender daily-cap rules for a dispatch attempt.

daily_cap(step, adapter)

@spec daily_cap(map(), map()) :: pos_integer() | nil

Resolves the configured sender daily cap from step or adapter config.

sender_domain(payload_or_template)

@spec sender_domain(map()) :: binary() | nil

Extracts the sender domain from a payload or template.

sender_mailbox(payload)

@spec sender_mailbox(map()) :: {:ok, binary()} | {:no_sender, :missing_sender}

Extracts the sender mailbox from a payload.