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::mailbox(3) - osx
imap_check(3) - php
imap_getmailboxes(3) - php
imap_mailboxmsginfo(3) - php
imap_reopen(3) - php
Similar Topics in the Unix Linux Community
Download Free personal firewallls
pattern match question
How to use one variable value to another variable?
Problem in echo value after some calculation
Getting error while priniting