php man page for imap_rfc822_parse_adrlist

Query: imap_rfc822_parse_adrlist

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

IMAP_RFC822_PARSE_ADRLIST(3)						 1					      IMAP_RFC822_PARSE_ADRLIST(3)

imap_rfc822_parse_adrlist - Parses an address string

SYNOPSIS
array imap_rfc822_parse_adrlist (string $address, string $default_host)
DESCRIPTION
Parses the address string as defined in RFC2822 and for each address.
PARAMETERS
o $address - A string containing addresses o $default_host - The default host name
RETURN VALUES
Returns an array of objects. The objects properties are: o mailbox - the mailbox name (username) o host - the host name o personal - the personal name o adl - at domain source route
EXAMPLES
Example #1 imap_rfc822_parse_adrlist(3) example <?php $address_string = "Joe Doe <doe@example.com>, postmaster@example.com, root"; $address_array = imap_rfc822_parse_adrlist($address_string, "example.com"); if (!is_array($address_array) || count($address_array) < 1) { die("something is wrong "); } foreach ($address_array as $id => $val) { echo "# $id "; echo " mailbox : " . $val->mailbox . " "; echo " host : " . $val->host . " "; echo " personal: " . $val->personal . " "; echo " adl : " . $val->adl . " "; } ?> The above example will output: # 0 mailbox : doe host : example.com personal: Joe Doe adl : # 1 mailbox : postmaster host : example.com personal: adl : # 2 mailbox : root host : example.com personal: adl :
SEE ALSO
imap_rfc822_parse_headers(3). PHP Documentation Group IMAP_RFC822_PARSE_ADRLIST(3)
Related Man Pages
net::dns::mailbox5.18(3) - mojave
net::dns::mailbox(3) - centos
net::dns::mailbox(3) - mojave
imap_check(3) - php
imap_getmailboxes(3) - php
Similar Topics in the Unix Linux Community
check for NULL variable
WordPress 2.6 (Release branch)
pattern match question
How can i secure my personal data and E-mail id?
broken pipe error