PHPMailer\PHPMailer

PHPMailer::addrAppend()publicWP 1.0

Create recipient headers.

Метод класса: PHPMailer{}

Хуков нет.

Возвращает

Строку.

Использование

$PHPMailer = new PHPMailer();
$PHPMailer->addrAppend( $type, $addr );
$type(строка) (обязательный)
-
$addr(массив) (обязательный)
An array of recipients, where each recipient is a 2-element indexed array with element 0 containing an address and element 1 containing a name, like: [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']]

Код PHPMailer::addrAppend() WP 6.5.2

public function addrAppend($type, $addr)
{
    $addresses = [];
    foreach ($addr as $address) {
        $addresses[] = $this->addrFormat($address);
    }

    return $type . ': ' . implode(', ', $addresses) . static::$LE;
}