PHPMailer::clearAddresses PHP Method

clearAddresses() public method

Clear all To recipients.
public clearAddresses ( ) : void
return void
    public function clearAddresses()
    {
        foreach ($this->to as $to) {
            unset($this->all_recipients[strtolower($to[0])]);
        }
        $this->to = array();
        $this->clearQueuedAddresses('to');
    }

Usage Example

Example #1
0
 /**
  * @param bool $immediately
  * @return bool
  * @throws \phpmailerException
  */
 public function send($immediately = true)
 {
     $salida = $this->mail->Send();
     $this->mail->clearAddresses();
     $this->mail->clearAttachments();
     return $salida;
 }
All Usage Examples Of PHPMailer::clearAddresses