(index ("email-address" 0) ("email-address-list" 293) ("name->string" 901) ("local-part->string" 1138) ("local-part->string-ci" 1462) ("domain-part->string" 1956) ("addr-spec->string" 2286))
(def (sig (procedure "(email-address string-port-or-lazy-sequence)" (id email-address))) (p "This API will take its argument and try to parse a single mailbox or group. If nothing parses or there are characters left over after the parsing completes then the parse fails and #f is returned."))
(def (sig (procedure "(email-address-list string-port-or-lazy-sequence)" (id email-address-list))) (p "This API will take its argument and try to parse a list of addresses separated by commas or whitespace.") (p "It will parse as many addresses (mailboxes or groups) as it can. Any unparsable data will be returned in the 2nd value. If everything was parsable then the 2nd value will be #<lazy-null>.") (p "This parser is much more lenient than a To: header parser because it allows the addresses to be delimited with whitespace and it does not require the whole input to be parsable in order to succeed."))
(def (sig (procedure "(name->string email-address)" (id name->string))) (p "Returns the name part of the address") (pre "> (use email-address)\n> (name->string (email-address \"Andy Bennett <andyjpb@example.net>\"))\n\"Andy Bennett\""))
(def (sig (procedure "(local-part->string email-address)" (id local-part->string))) (p "Returns the local part of the address as it appears in the original: the RFC allows MTAs to be case sensitive.") (pre "> (use email-address)\n> (local-part->string (email-address \"Andy Bennett <ANDYJPB@EXAMPLE.NET>\"))\n\"ANDYJPB\""))
(def (sig (procedure "(local-part->string-ci email-address)" (id local-part->string-ci))) (p "Returns a lower case version of the local part of the address. Use this if you know that the MTAs for the relevant domain are not case-sensitive. You can also use this to deduplicate addresses with mixed case local parts for domains with MTAs that are not case-sensitive.") (pre "> (use email-address)\n> (local-part->string-ci (email-address \"Andy Bennett <ANDYJPB@EXAMPLE.NET>\"))\n\"andyjpb\""))
(def (sig (procedure "(domain-part->string email-address)" (id domain-part->string))) (p "Returns a lower case version of the domain part of the address: DNS domain names are always case insensitive.") (pre "> (use email-address)\n> (domain-part->string (email-address \"Andy Bennett <ANDYJPB@EXAMPLE.NET>\"))\n\"example.net\""))
(def (sig (procedure "(addr-spec->string email-address)" (id addr-spec->string))) (p "Returns the local@domain part of the email-address, suitable for use in an SMTP dialogue. The case of the local part will be the same in the original address. The domain part will be lower case.") (pre "> (use email-address)\n> (addr-spec->string (email-address \"Andy Bennett <ANDYJPB@EXAMPLE.NET>\"))\n\"ANDYJPB@example.net\""))
