WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана


PHPMailer::addOrEnqueueAnAddress() protected WP 1.0

Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still be modified after calling this function), addition of such addresses is delayed until send(). Addresses that have been added already return false, but do not throw exceptions.

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

Хуков нет.


true|false. true on success, false if address already used or invalid in some way


// protected - в коде основоного (родительского) или дочернего класса
$result = $this->addOrEnqueueAnAddress( $kind, $address, $name );
$kind(строка) (обязательный)
One of 'to', 'cc', 'bcc', or 'ReplyTo'
$address(строка) (обязательный)
The email address to send, resp. to reply to
$name(строка) (обязательный)

Код PHPMailer::addOrEnqueueAnAddress() WP 5.8.3

protected function addOrEnqueueAnAddress($kind, $address, $name)
    $address = trim($address);
    $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
    $pos = strrpos($address, '@');
    if (false === $pos) {
        //At-sign is missing.
        $error_message = sprintf(
            '%s (%s): %s',
        if ($this->exceptions) {
            throw new Exception($error_message);

        return false;
    $params = [$kind, $address, $name];
    //Enqueue addresses with IDN until we know the PHPMailer::$CharSet.
    if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) {
        if ('Reply-To' !== $kind) {
            if (!array_key_exists($address, $this->RecipientsQueue)) {
                $this->RecipientsQueue[$address] = $params;

                return true;
        } elseif (!array_key_exists($address, $this->ReplyToQueue)) {
            $this->ReplyToQueue[$address] = $params;

            return true;

        return false;

    //Immediately add standard addresses without IDN.
    return call_user_func_array([$this, 'addAnAddress'], $params);