PEAR Handbuch | ||
---|---|---|
Zurück | Nach vorne |
This class performs email address checking according to the RFC822 specification. Note, that the class only checks for a proper format of the indicated email addresses. This means, it is not guaranted that the email adress itself is valid or exists.
Set up the object. The address must either be set here or when calling parseAddressList (). One or the other.
string $address - The address(es) to validate
string $defaultDomain - The default domain to use in case of absence in the given email address. Deault is 'localhost'
boolean $nestGroups - Whether to return the structure with groups nested for easier viewing.
boolean $validate - Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance.
string $address - The address(es) to validate
string $defaultDomain - The default domain to use in case of absence in the given email address. Deault is 'localhost'
boolean $nestGroups - Whether to return the structure with groups nested for easier viewing.
boolean $validate - Whether to validate atoms. Turn this off if you need to run addresses through before encoding the personal names, for instance.
This example instanciates an object, calls the validation method parseAddressList() and then prints the results:
<?php $address = 'My group: "Richard Heyes" <richard@localhost>;, ted@phpguru.org (A comment)'; $rfc822 = new Mail_RFC822($address, 'phpguru.org', TRUE); $addresses = $rfc822->parseAddressList(); print_r($addresses); ?> |
This example produces the same results as above except that it calls the parseAddressList() method statically:
<?php $address = 'My group: "Richard Heyes" <richard@localhost>;, ted@phpguru.org (A comment)'; $addresses = Mail_RFC822::parseAddressList($address, 'phpguru.org', TRUE); print_r($addresses); ?> |
Zurück | Zum Anfang | Nach vorne |
Mail_mimeDecode | Nach oben | Networking functions |