Mail_RFC822::parseAddressList()

Mail_RFC822::parseAddressList() -- extract the parts of a list of email addresses

Referentiesamenvatting

require_once 'Mail/RFC822.php';

array parseAddressList ([string $address = '', string [$defaultDomain = 'localhost'] [, boolean $nestGroups = NULL [, boolean $validate = NULL]]])

Beschrijving

Extracts the given addresses into their parts.

Parameter

Return waarde

array - a nested array of anonymous objects.

If $nestGroups set to FALSE, you can jump over the next paragraph.

Every array entry contains an object per group. This object has two attributes:

groupname - the name of the group
addresses - an array of all addresses of a group

The addresses array consists of an array of anonymous objects for each address. This object comes with the following attributes:

personal - the name of the address owner
comment - an array, an entry for each comment per address
mailbox - the name of the mailbox, the part before the @
host - the name of the server, the part after the @

Throws

Tabel 47-1. Mogelijke PEAR_Error waarden

Error codeError messageReasonSolution
NULL every The given address string is not RFC822 compliant The error code contains a description of the error.

Note

Deze functie kan statisch worden aangeroepen.

Waarschuwing

This class checks the string only. It does not check for the existence of an email address.

Voorbeeld