Structsยง
- Check
User ๐AndTemplate Row - Email
Delivery - Email
Delivery Error - Email
Delivery Error Insert - Email
Send Status Facts - The delivery-row facts
derive_email_send_statusneeds, so the derivation itself is pure. - Email
Send Status Report - The shared payload for every surface that reports on a queued email.
Enumsยง
- Email
Send Status - What we can honestly say about an email we queued.
Constantsยง
- FETCH_
LIMIT - PURGE_
CHANCE_ ๐IN - One purge in this many calls, matching the token cleanups. The caller schedules how often it asks.
- RECIPIENT_
ADDRESS_ ๐RETENTION - How long a delivery to a raw address may keep that address after being queued.
- RETRY_
WINDOW_ SECS - How long a delivery keeps being retried after its first failure.
Functionsยง
- derive_
email_ send_ status - The one derivation of send status. Every surface goes through it.
- fetch_
emails - get_
send_ status - get_
send_ statuses - increment_
retry_ and_ mark_ non_ retryable - increment_
retry_ and_ schedule - insert_
email_ delivery - Inserts an email delivery; fails if the user or email template is soft-deleted.
- insert_
email_ delivery_ error - insert_
email_ delivery_ to_ address - Queues an email to a raw address, for recipients who may have no account here.
- mark_
as_ sent - maybe_
purge_ expired_ recipient_ addresses - Probabilistic purge instead of a cron, in the style of the token cleanups.
- soft_
delete_ unsent_ retryable_ deliveries_ for_ user - Soft-deletes unsent, still-retryable email deliveries for a user. Call when soft-deleting the user so pending deliveries are not retried.