ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMailImapRfc822AddressParser Class Reference

Class ilMailImapRfc822AddressParser. More...

+ Inheritance diagram for ilMailImapRfc822AddressParser:
+ Collaboration diagram for ilMailImapRfc822AddressParser:

Protected Member Functions

 parseAddressString (string $a_addresses)
 
- Protected Member Functions inherited from ilBaseMailRfc822AddressParser
 parseAddressString (string $a_addresses)
 

Additional Inherited Members

- Public Member Functions inherited from ilBaseMailRfc822AddressParser
 __construct (string $a_addresses, string $installationHost=\ilMail::ILIAS_HOST)
 
 getAddresses ()
 
 setAddresses (string $addresses)
 A comma separated list of email addresses. More...
 
 parse ()
 
Returns
ilMailAddress[]
More...
 
- Protected Attributes inherited from ilBaseMailRfc822AddressParser
 $addresses = ''
 
 $installationHost = ''
 

Detailed Description

Member Function Documentation

◆ parseAddressString()

ilMailImapRfc822AddressParser::parseAddressString ( string  $a_addresses)
protected

Definition at line 13 of file class.ilMailImapRfc822AddressParser.php.

13  : array
14  {
15  $parsed_addresses = imap_rfc822_parse_adrlist($a_addresses, $this->installationHost);
16 
17  // #18992
18  $valid_parsed_addresses = array_filter($parsed_addresses, function ($address) {
19  return '.SYNTAX-ERROR.' != $address->host;
20  });
21 
22  if ($parsed_addresses != $valid_parsed_addresses) {
23  throw new \ilMailException($a_addresses);
24  }
25 
26  return array_map(function ($address) {
27  return new \ilMailAddress($address->mailbox, $address->host);
28  }, $valid_parsed_addresses);
29  }

The documentation for this class was generated from the following file: