MailAddress v1.0.1 MailAddress.Options View Source
Contains struct to hold configuration.
Link to this section Summary
Types
The MailAddress.Options struct
Link to this section Types
t() :: %MailAddress.Options{
allow_address_literal: boolean(),
allow_localhost: boolean(),
allow_null: boolean(),
allow_null_local_part: boolean(),
downcase_domain: boolean(),
max_address_length: pos_integer(),
max_domain_length: pos_integer(),
max_local_part_length: pos_integer(),
require_brackets: boolean(),
require_domain: boolean()
}
The MailAddress.Options struct.
Link to this section Functions
Holds the configuration options for handling addresses.
:allow_address_literal- iftrue, allows domain part to be an address literal. Defaults tofalse.:allow_localhost- iftrue, allows domain part to be “localhost” or the equivalent address literal ([127.0.0.1]or[IPv6:::1]). Defaults tofalse.:allow_null- iftrueallows address to be null. Defaults tofalse.:allow_null_local_part- iftrueallows address to have an empty local part. Defaults tofalse.:downcase_domain- iftruedowncases domain automatically. Defaults tofalse.:max_address_length- the maximum total length in characters. Defaults to 256 (from RFC5321).:max_domain_length- the maximum domain length in characters. Defaults to 255 (from RFC5321).:max_local_part_length- the maximum local part length in characters. Defaults to 64 (from RFC5321).:require_brackets- iftrue, insists that address must be surrounded by angle brackets ‘<’ and ‘>’. Iffalsethe brackets are optional and any parsing will stop when either the end of string, or a space after the last valid domain character is reached. Defaults tofalse.:require_domain- iftruethen the address must have a domain component unless it is a null address. Defaults totrue.
Returns relaxed parsing options.