PHPMailer\PHPMailer

PHPMailer::set()publicWP 1.0

Set or reset instance properties. You should avoid this function - it's more verbose, less efficient, more error-prone and harder to debug than setting properties directly. Usage Example: $mail->set('SMTPSecure', static::ENCRYPTION_STARTTLS); is the same as: $mail->SMTPSecure = static::ENCRYPTION_STARTTLS;.

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

Хуков нет.

Возвращает

true|false.

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

$PHPMailer = new PHPMailer();
$PHPMailer->set( $name, $value );
$name(строка) (обязательный)
The property name to set
$value(разное)
The value to set the property to
По умолчанию: ''

Код PHPMailer::set() WP 6.1.1

public function set($name, $value = '')
{
    if (property_exists($this, $name)) {
        $this->{$name} = $value;

        return true;
    }
    $this->setError($this->lang('variable_set') . $name);

    return false;
}