• Resolved Hashirama Senju

    (@hashirama244)


    Hello team,

    In your plugin i have faced fatal error when connected SMTP from settings, and submitted form from front side, it gives following fatal error

    PHP Fatal error:  Uncaught PHPMailer\PHPMailer\Exception: SMTP Error: Could not connect to SMTP host. Failed to connect to server in wp-includes\PHPMailer\PHPMailer.php:2284

    Stack trace:

    #0 wp-includes\PHPMailer\PHPMailer.php(2060): PHPMailer\PHPMailer\PHPMailer->smtpConnect(Array)

    #1 wp-includes\PHPMailer\PHPMailer.php(1689): PHPMailer\PHPMailer\PHPMailer->smtpSend('Date: Sun, 3 Au...', '--b1=_2KrxO83Kr...')

    #2 wp-includes\PHPMailer\PHPMailer.php(1523): PHPMailer\PHPMailer\PHPMailer->postSend()

    #3 wp-content\plugins\contact-form-by-supsystic\modules\mail\mod.php(138): PHPMailer\PHPMailer\PHPMailer->send()

    #4 wp-content\plugins\contact-form-by-supsystic\modules\mail\mod.php(11): mailCfs->sendSmtpMail(Array, 'Contact form su...', '<html lang="en_...', 'test_ws3', '[email protected]...', 'test_ws3', '[email protected]...', Array, Array)

    #5 wp-content\plugins\contact-form-by-supsystic\modules\forms\models\forms.php(343): mailCfs->send('[email protected]...', 'Contact form su...', '<html lang="en_...', 'test_ws3', '[email protected]...', 'test_ws3', '[email protected]...', Array)

    #6 wp-content\plugins\contact-form-by-supsystic\modules\forms\models\forms.php(70): formsModelCfs->sendContact(Array, Array)

    #7 wp-content\plugins\contact-form-by-supsystic\modules\forms\controller.php(368): formsModelCfs->contact(Array)

    #8 wp-includes\class-wp-hook.php(324): formsControllerCfs->contact('')

    #9 wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array)

    #10 wp-includes\plugin.php(517): WP_Hook->do_action(Array)

    #11 wp-admin\admin-ajax.php(207): do_action('wp_ajax_nopriv_...')

    #12 {main}

      thrown in wp-includes\PHPMailer\PHPMailer.php on line 2284

    Please solve it ASAP

Viewing 1 replies (of 1 total)
  • Plugin Author supsystic

    (@supsysticcom)

    Hello, @hashirama244

    SMTP Error: Could not connect to SMTP host. Failed to connect to server

    Isn’t actually a bug in the Contact Form by Supsystic plugin itself — it means that PHPMailer (which WordPress uses under the hood) could not establish a connection to your SMTP server.

    1. Double-check your SMTP settings

    • Host: Use the correct SMTP server (e.g., smtp.gmail.com, smtp.office365.com, etc.).
    • Port: Usually 587 (TLS) or 465 (SSL).
    • Encryption: Must match the port (TLS with 587, SSL with 465).
    • Username / Password: Make sure credentials are correct and the mailbox is active.

    2. Verify server/network connectivity

    • Ensure your web host allows outbound SMTP connections.
      👉 Many shared hosting providers block port 25 and sometimes even 465/587.
    • To test, try running: telnet smtp.gmail.com 587 from the server. If it times out, your host is blocking the connection. In that case, you’ll need to contact your hosting support or use an alternative mailer service.
Viewing 1 replies (of 1 total)

The topic ‘Fatal error when submit form from front side’ is closed to new replies.