RFC 822 Email address list validation Utility
What is it?
This class will take an address string, and parse it into it's consituent parts, be that either addresses, groups, or combinations. Nested groups are not supported. The structure it returns is pretty straight forward, and is similar to that provided by the imap_rfc822_parse_adrlist(). Use print_r() to view the structure.
How do I use it?
$address_string = 'My Group: "Richard Heyes" <richard@localhost> (A comment), ted@example.com (Ted Bloggs), Barney;'; $structure = Mail_RFC822::parseAddressList($address_string, 'example.com', TRUE) print_r($structure);
Located in /src/mail/class.RFC822.php (line 27)
Sets up the object. The address must either be set here or when calling parseAddressList(). One or the other.
Returns an approximate count of how many addresses are
in the given string. This is APPROXIMATE as it only splits based on a comma which has no preceding backslash. Could be useful as large amounts of addresses will end up producing *large* structures when used with parseAddressList().
This is a email validating function seperate to the rest
of the class. It simply validates whether an email is of the common internet form: <user>@<domain>. This can be sufficient for most people. Optional stricter mode can be utilised which restricts mailbox characters allowed to alphanumeric, full stop, hyphen and underscore.
Starts the whole process. The address must either be set here or when creating the object. One or the other.
Function to validate a mailbox, which is: mailbox = addr-spec ; simple address / phrase route-addr ; name and route-addr
Documentation generated on Sat, 24 Mar 2007 09:59:56 +0100 by phpDocumentor 1.3.1