public function PHPMailer::addrAppend
Search API
5.x PHPMailer.php | public PHPMailer::addrAppend($type, $addr) |
Create recipient headers.
Parameters
string $type:
array $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']]
Return value
string
2 calls to PHPMailer::addrAppend()
- PHPMailer::createHeader in inc/
PHPMailer/ src/ PHPMailer.php - Assemble message headers.
- PHPMailer::preSend in inc/
PHPMailer/ src/ PHPMailer.php - Prepare a message for sending.
File
- inc/
PHPMailer/ src/ PHPMailer.php, line 2115
Class
- PHPMailer
- PHPMailer - PHP email creation and transport class.
Namespace
PHPMailer\PHPMailerCode
public function addrAppend($type, $addr)
{
$addresses = [];
foreach ($addr as $address) {
$addresses [] = $this->addrFormat($address);
}
return $type . ': ' . implode(', ', $addresses) . static::$LE;
}