PHPMailer\PHPMailer

PHPMailer::send()publicWP 1.0

Create a message and send it. Uses the sending method specified by $Mailer.

Method of the class: PHPMailer{}

No Hooks.

Return

true|false. false on error - See the ErrorInfo property for details of the error

Usage

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

PHPMailer::send() code WP 6.5.2

public function send()
{
    try {
        if (!$this->preSend()) {
            return false;
        }

        return $this->postSend();
    } catch (Exception $exc) {
        $this->mailHeader = '';
        $this->setError($exc->getMessage());
        if ($this->exceptions) {
            throw $exc;
        }

        return false;
    }
}