PHPMailer\PHPMailer
PHPMailer::set
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;.
Method of the class: PHPMailer{}
No Hooks.
Returns
true|false.
Usage
$PHPMailer = new PHPMailer(); $PHPMailer->set( $name, $value );
- $name(string) (required)
- The property name to set.
- $value(mixed)
- The value to set the property to.
Default:''
PHPMailer::set() PHPMailer::set code WP 7.0
public function set($name, $value = '')
{
if (property_exists($this, $name)) {
$this->{$name} = $value;
return true;
}
$this->setError(self::lang('variable_set') . $name);
return false;
}