PHPMAILER Not sending and not giving error

You need to call:

$mail = new PHPMailer(true); // with true in the parenthesis

From the documentation:

The true param means it will throw exceptions on errors, which we need
to catch.

Leave a Comment