Home Forums Porto Template FAQ’s How to debug in PHPMailer (contact-us-advanced.php)

This topic contains 0 replies, has 1 voice, and was last updated by  Support 4 years, 2 months ago. This post has been viewed 9444 times

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #10003568

    Support
    Keymaster

    If you want to debug the contact-us-advanced.php (phpMailer), here’s what you need to do:

    1) Add the debug option:

    $mail->SMTPDebug = 1;

    2) Display the error message:

    if($mail->Send()) {
       $arrResult['response'] = 'success';
    } else {
    	$arrResult['response'] = 'error';
    	echo "There was a problem sending the form.: " . $mail->ErrorInfo;
    	exit;
    }

    3) Submit the form, if there’s a error it will show a message like this:


Viewing 1 post (of 1 total)