Classes/Transport/LoggingTransport.php
protected function buildStringFromEmailAndNameArray(array $addresses): string
    {
        $results = [];
        foreach ($addresses as $emailAddress => $name) {
            if ($name !== '') {
                $results[] = sprintf('%s <%s>', $name, $emailAddress);
            } else {
                $results[] = $emailAddress;
            }
        }
        return implode(', ', $results);
    }
protected function buildStringFromEmailAndNameArray(array $addresses): string
    {
        $results = [];
        foreach ($addresses as $emailAddress => $name) {
            if ($name !== '') {
                $results[] = sprintf('%s <%s>', $name, $emailAddress);
            } else {
                $results[] = $emailAddress;
            }
        }
        return implode(', ', $results);
    }
protected function buildStringFromEmailAndNameArray ( array $ addresses ) : string { $ results = [ ] ; foreach ( $ addresses as $ emailAddress => $ name ) { if ( $ name !== '' ) { $ results [ ] = sprintf ( '%s <%s>' , $ name , $ emailAddress ) ; } else { $ results [ ] = $ emailAddress ; } } return implode ( ', ' , $ results ) ; }
Builds a plaintext-compatible string representing an array of given E-Mail addresses.

@param array $addresses The addresses where the key is the email address and the value is a name
@return string Looking like "John Doe <demo@example.org>, Jeanne Dough <foo@example.org>, somebody@example.org"
Builds a plaintext - compatible string representing an array of given E - Mail addresses .