PHPMailer\PHPMailer\PHPMailer::set PHP Метод

set() публичный метод

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', 'tls'); is the same as: $mail->SMTPSecure = 'tls';
public set ( string $name, mixed $value = '' ) : boolean
$name string The property name to set
$value mixed The value to set the property to
Результат boolean
    public function set($name, $value = '')
    {
        if (property_exists($this, $name)) {
            $this->{$name} = $value;
            return true;
        } else {
            $this->setError($this->lang('variable_set') . $name);
            return false;
        }
    }