PHPMailer::doCallback PHP Method

doCallback() protected method

Perform a callback.
protected doCallback ( boolean $isSent, array $to, array $cc, array $bcc, string $subject, string $body, string $from )
$isSent boolean
$to array
$cc array
$bcc array
$subject string
$body string
$from string
    protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from)
    {
        if (!empty($this->action_function) && is_callable($this->action_function)) {
            $params = array($isSent, $to, $cc, $bcc, $subject, $body, $from);
            call_user_func_array($this->action_function, $params);
        }
    }

Usage Example

 protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body)
 {
     if (is_callable($this->action_function)) {
         return call_user_func_array($this->action_function, array($isSent, $to, $cc, $bcc, $subject, $body));
     }
     return parent::doCallback($isSent, $to, $cc, $bcc, $subject, $body);
 }