Skip to content
Newer
Older
100644 18 lines (15 sloc) 640 Bytes
4d33df8 This is something I wrote for an old bug report - may as well get it …
Chuck Hagenbuch authored
1 <?php
2 require_once '../Mail/RFC822.php';
3 $address_string = '"Joe Doe \(from Somewhere\)" <doe@example.com>, postmaster@example.com, root';
4 // $address_string = "Joe Doe from Somewhere <doe@example.com>, postmaster@example.com, root";
5 echo $address_string . "\n";
6
7 $address_array = Mail_RFC822::parseAddressList($address_string, "example.com");
8 if (!is_array($address_array) || count($address_array) < 1) {
9 die("something is wrong\n");
10 }
11
12 foreach ($address_array as $val) {
13 echo "mailbox : " . $val->mailbox . "\n";
14 echo "host : " . $val->host . "\n";
15 echo "personal: " . $val->personal . "\n";
16 }
17 print_r($address_array);
Something went wrong with that request. Please try again.