PHPMailer\PHPMailer
PHPMailer::addrFormat()
Format an address for use in a message header.
Method of the class: PHPMailer{}
No Hooks.
Return
String
.
Usage
$PHPMailer = new PHPMailer(); $PHPMailer->addrFormat( $addr );
- $addr(array) (required)
- A 2-element indexed array, element 0 containing an address, element 1 containing a name like ['[email protected]', 'Joe User']
PHPMailer::addrFormat() PHPMailer::addrFormat code WP 6.7.1
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]) . '>'; }