How to debug in PHPMailer (contact-us-advanced.php)

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

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)

This topic is marked as "RESOLVED" and can not rceive new replies.