Skip to main content

Module config

Module config 

Source
Expand description

Product-neutral mail runtime configuration normalization.

Product crates still own the concrete configuration keys, default values, runtime config reading, and API error mapping. This module keeps recurring validation and normalization rules for mail-related config values, plus the product-neutral runtime settings model used by shared sender implementations.

Structs§

MailConfigError
Error returned when mail configuration normalization fails.
MailRuntimeSettings
Runtime SMTP settings shared by Aster service mail senders.

Constants§

DEFAULT_MAIL_SECURITY
Default SMTP encryption policy used by Aster services when runtime config is absent.
DEFAULT_MAIL_SMTP_PORT
Default SMTP port used by Aster services when runtime config is absent.
MAIL_TEMPLATE_MAX_BODY_LEN
Maximum HTML body length accepted by the shared mail template normalizer.
MAIL_TEMPLATE_MAX_SUBJECT_LEN
Maximum subject length accepted by the shared mail template normalizer.

Functions§

normalize_mail_address_config_value
Normalizes a sender email address value.
normalize_mail_name_config_value
Normalizes a sender display name value.
normalize_mail_security_config_value
Normalizes a bool-like mail security config value.
normalize_mail_template_body_config_value
Normalizes a mail template HTML body.
normalize_mail_template_subject_config_value
Normalizes a mail template subject.
normalize_smtp_host_config_value
Normalizes an SMTP host value.
normalize_smtp_port_config_value
Normalizes an SMTP port value.
parse_smtp_port
Parses an SMTP port from a storage string.

Type Aliases§

MailConfigResult
Result type returned by shared mail configuration helpers.