PHPMailer\PHPMailer

PHPMailer::clearAddresses()publicWP 1.0

Clear all To recipients.

{} It's a method of the class: PHPMailer{}

No Hooks.

Return

null. Nothing.

Usage

$PHPMailer = new PHPMailer();
$PHPMailer->clearAddresses();

Code of PHPMailer::clearAddresses() WP 6.0

public function clearAddresses()
{
    foreach ($this->to as $to) {
        unset($this->all_recipients[strtolower($to[0])]);
    }
    $this->to = [];
    $this->clearQueuedAddresses('to');
}