Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MailboxListHeader.php

function MailboxListHeader::getAddressStrings

Gets the full mailbox list of this Header as an array of valid RFC 2822 strings.

Return value

string[]

Throws

RfcComplianceException

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\Header

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal