function MailboxListHeader::getAddressStrings
Gets the full mailbox list of this Header as an array of valid RFC 2822 strings.
Return value
string[]
Throws
1 call to MailboxListHeader::getAddressStrings()
- MailboxListHeader::getBodyAsString in vendor/
symfony/ mime/ Header/ MailboxListHeader.php - Gets the header's body, prepared for folding into a final header value.
File
-
vendor/
symfony/ mime/ Header/ MailboxListHeader.php, line 106
Class
- MailboxListHeader
- A Mailbox list MIME Header for something like From, To, Cc, and Bcc (one or more named addresses).
Namespace
Symfony\Component\Mime\HeaderCode
public function getAddressStrings() : array {
$strings = [];
foreach ($this->addresses as $address) {
$str = $address->getEncodedAddress();
if ($name = $address->getName()) {
$str = $this->createPhrase($this, $name, $this->getCharset(), !$strings) . ' <' . $str . '>';
}
$strings[] = $str;
}
return $strings;
}