Skip to main content

Module mailto

Module mailto 

Source
Expand description

mailto: addresses (RFC 6068): the message a link, or another application, asks to write. Recipients (the part before “?”, and to, cc, bcc), subject, body, and In-Reply-To for the message it answers. Nothing else is read: above all no attach or attachment, which some programs take and which would let a web page name one of your files, nor from. Nothing here sends anything: the address only fills a draft (docs/client.md, “Writing from other applications”).

Structs§

Mailto
What a mailto: address asks.

Functions§

decode
Percent-decoding (RFC 3986 §2.1): the bytes read as UTF-8, a wrong one replaced; “+” stays “+” (a space is “%20” in mailto:, RFC 6068 §5), and a “%” not followed by two hexadecimal digits stays as it is.
header 🔒
A header’s value as written, its MIME encoded words decoded (RFC 2047, allowed in header values by RFC 6068 §2): read as a header by the same parser as received mail.
is_mailto
Whether text is a mailto: address, in any case.
once_each
Each address once in a list, the first spelling kept: “Jane jane@x.org” and “JANE@x.org” are one.
one_line 🔒
A header’s value on one line: a line break would be a header of its own.
parse
Reads a mailto: address; none when uri is not one.