PHPMailer\PHPMailer
PHPMailer::addrFormat()
Format an address for use in a message header.
Метод класса: PHPMailer{}
Хуков нет.
Возвращает
Строку
.
Использование
$PHPMailer = new PHPMailer(); $PHPMailer->addrFormat( $addr );
- $addr(массив) (обязательный)
- A 2-element indexed array, element 0 containing an address, element 1 containing a name like ['joe@example.com', 'Joe User']
Код PHPMailer::addrFormat() PHPMailer::addrFormat WP 6.5.2
public function addrFormat($addr) { if (!isset($addr[1]) || ($addr[1] === '')) { //No name provided return $this->secureHeader($addr[0]); } return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader($addr[0]) . '>'; }