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.
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 separate 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.
Return: False if it fails, an indexed array username/domain if it matches