Skip to main content

Module email_deliver

Module email_deliver 

Source

EnumsΒ§

TemplateReplacements πŸ”’

ConstantsΒ§

BASE_BACKOFF_SECS πŸ”’
BATCH_SIZE πŸ”’
JITTER_SECS πŸ”’
MAX_BACKOFF_SECS πŸ”’
RECIPIENT_ADDRESS_PURGE_INTERVAL πŸ”’
How often the sender asks the model to purge expired recipient addresses. The model then rolls its own 1 in 10 chance, so a sweep lands roughly every ten hours.

StaticsΒ§

BASE_URL πŸ”’
The same variable the server reads into ApplicationConfiguration::base_url: a mailed link has to point at the environment that minted its token. Not FRONTEND_BASE_URL, which no overlay sets, so reading that sends dev and test links to production.
DB_URL πŸ”’
SMTP_FROM πŸ”’
SMTP_HOST πŸ”’
SMTP_MESSAGE_ID_DOMAIN πŸ”’
SMTP_PASS πŸ”’
SMTP_PLAINTEXT_PORT πŸ”’
When set, mail goes to SMTP_HOST on this port without TLS, for the local Mailpit in dev and test. Unset, the sender uses implicit TLS on port 465.
SMTP_USER πŸ”’

FunctionsΒ§

build_email_message πŸ”’
compute_next_retry_at πŸ”’
extract_smtp_error_details πŸ”’
has_io_error πŸ”’
infer_email_domain πŸ”’
is_transient_smtp_error πŸ”’
mail_sender
Sends one batch of due emails. warned_layouts is the updated_at of each layout last checked for problems, so each version is warned about once rather than every batch.
main
placeholder_bag_replacements πŸ”’
Turns a delivery’s placeholder bag into {{KEY}} substitutions. Nested objects and arrays are skipped: there is no sensible rendering for them in body text.
record_message_build_failure πŸ”’
record_non_retryable_failure πŸ”’
retry_window_expired πŸ”’
send_message
template_replacements πŸ”’
warn_about_layout_problems πŸ”’