Is it possible in zend mail to get a list of letters selected by the sender's mail or subject? And not everything, sorting them out later?
Now I do this: - I get the whole box - I’m looking for what I need next.
And along the way, the second question: $message->from gives not mail, but the name of the box
`Zend\Mail\Header\From Object ( [fieldName:protected] => From [addressList:protected] => Zend\Mail\AddressList Object ( [addresses:protected] => Array ( [connect-support@yandex-team.ru] => Zend\Mail\Address Object ( [comment:protected] => [email:protected] => connect-support@yandex-team.ru [name:protected] => Yandex.Connect ) ) ) [encoding:protected] => ASCII )` in this case, Yandex.Connect, how to get email?
Now I get it, but it is a perversion:
$from = $message->getHeader("from")->getAddressList(); foreach ($from as $email){ echo "<pre>"; print_r($email->getEmail()); echo "</pre>"; }