View Source smtp_util (gen_smtp v1.3.0)
Module with some general utility functions for SMTP.
Link to this section Summary
Functions
Compute the CRAM digest of Key and Data
Generate a unique MIME message boundary
Generate a unique message ID
Generate a seed string for CRAM.
guess the current host's fully qualified domain name, on error return "localhost"
returns a sorted list of mx servers for Domain, lowest distance first
Parse list of mail addresses in RFC-5322#section-3.4 mailbox-list format
Generate a RFC 5322 timestamp based on the current time
Trim \r\n from String
Calculate the current timezone and format it like -0400. Borrowed from YAWS.
Link to this section Types
Specs
name_address() :: {Name :: string() | undefined, Address :: string()}.
      Link to this section Functions
Specs
compute_cram_digest(Key :: binary(), Data :: binary()) -> binary().
Compute the CRAM digest of Key and Data
Generate a unique MIME message boundary
Generate a unique message ID
Specs
get_cram_string(Hostname :: string()) -> string().
Generate a seed string for CRAM.
Specs
guess_FQDN() -> string().
guess the current host's fully qualified domain name, on error return "localhost"
returns a sorted list of mx servers for Domain, lowest distance first
Specs
parse_rfc5322_addresses(string() | binary()) -> {ok, [name_address()]} | {error, any()}.
      Parse list of mail addresses in RFC-5322#section-3.4 mailbox-list format
Specs
parse_rfc822_addresses(string() | binary()) -> {ok, [name_address()]} | {error, any()}.
      Generate a RFC 5322 timestamp based on the current time
Specs
trim_crlf(String :: string()) -> string().
Trim \r\n from String
Calculate the current timezone and format it like -0400. Borrowed from YAWS.