Support » Plugin: WP Mail SMTP by WPForms » SMTP Error: Could not connect to SMTP host.

  • all my websites are working fine with this great plugin. only one i cant send mails. tried everything…
    please help
    here is the log of the test mail:

    Test Message Sent
    The result was:
    bool(false)
    The full debugging output is shown below:
    object(PHPMailer)#498 (73) {
      ["Version"]=>
      string(6) "5.2.10"
      ["Priority"]=>
      int(3)
      ["CharSet"]=>
      string(5) "UTF-8"
      ["ContentType"]=>
      string(10) "text/plain"
      ["Encoding"]=>
      string(4) "8bit"
      ["ErrorInfo"]=>
      string(43) "SMTP Error: Could not connect to SMTP host."
      ["From"]=>
      string(24) "wordpress@domain.co.il"
      ["FromName"]=>
      string(9) "WordPress"
      ["Sender"]=>
      string(24) "wordpress@domain.co.il"
      ["ReturnPath"]=>
      string(0) ""
      ["Subject"]=>
      string(47) "WP Mail SMTP: Test mail to **myname**@gmail.com"
      ["Body"]=>
      string(68) "This is a test email generated by the WP Mail SMTP WordPress plugin."
      ["AltBody"]=>
      string(0) ""
      ["Ical"]=>
      string(0) ""
      ["MIMEBody":protected]=>
      string(69) "This is a test email generated by the WP Mail SMTP WordPress plugin.
    "
      ["MIMEHeader":protected]=>
      string(398) "Date: Tue, 5 Apr 2016 06:48:05 +0000
    To: **myname**@gmail.com
    From: WordPress
    Subject: WP Mail SMTP: Test mail to **myname**@gmail.com
    Message-ID: <8119a4d0b35439df7198f036e9f4d43e@domain.co.il>
    X-Priority: 3
    X-Mailer: PHPMailer 5.2.10 (https://github.com/PHPMailer/PHPMailer/)
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    "
      ["mailHeader":protected]=>
      string(0) ""
      ["WordWrap"]=>
      int(0)
      ["Mailer"]=>
      string(4) "smtp"
      ["Sendmail"]=>
      string(18) "/usr/sbin/sendmail"
      ["UseSendmailOptions"]=>
      bool(true)
      ["PluginDir"]=>
      string(0) ""
      ["ConfirmReadingTo"]=>
      string(0) ""
      ["Hostname"]=>
      string(0) ""
      ["MessageID"]=>
      string(0) ""
      ["MessageDate"]=>
      string(30) "Tue, 5 Apr 2016 06:48:05 +0000"
      ["Host"]=>
      string(12) "**SMTP SERVER IP ADDRESS**"
      ["Port"]=>
      string(2) "25"
      ["Helo"]=>
      string(0) ""
      ["SMTPSecure"]=>
      string(0) ""
      ["SMTPAutoTLS"]=>
      bool(true)
      ["SMTPAuth"]=>
      bool(false)
      ["SMTPOptions"]=>
      array(0) {
      }
      ["Username"]=>
      string(0) ""
      ["Password"]=>
      string(0) ""
      ["AuthType"]=>
      string(0) ""
      ["Realm"]=>
      string(0) ""
      ["Workstation"]=>
      string(0) ""
      ["Timeout"]=>
      int(300)
      ["SMTPDebug"]=>
      bool(true)
      ["Debugoutput"]=>
      string(4) "echo"
      ["SMTPKeepAlive"]=>
      bool(false)
      ["SingleTo"]=>
      bool(false)
      ["SingleToArray"]=>
      array(0) {
      }
      ["do_verp"]=>
      bool(false)
      ["AllowEmpty"]=>
      bool(false)
      ["LE"]=>
      string(1) "
    "
      ["DKIM_selector"]=>
      string(0) ""
      ["DKIM_identity"]=>
      string(0) ""
      ["DKIM_passphrase"]=>
      string(0) ""
      ["DKIM_domain"]=>
      string(0) ""
      ["DKIM_private"]=>
      string(0) ""
      ["action_function"]=>
      string(0) ""
      ["XMailer"]=>
      string(0) ""
      ["smtp":protected]=>
      object(SMTP)#512 (13) {
        ["Version"]=>
        string(6) "5.2.10"
        ["SMTP_PORT"]=>
        int(25)
        ["CRLF"]=>
        string(2) "
    "
        ["do_debug"]=>
        bool(true)
        ["Debugoutput"]=>
        string(4) "echo"
        ["do_verp"]=>
        bool(false)
        ["Timeout"]=>
        int(300)
        ["Timelimit"]=>
        int(300)
        ["smtp_conn":protected]=>
        NULL
        ["error":protected]=>
        array(4) {
          ["error"]=>
          string(0) ""
          ["detail"]=>
          string(0) ""
          ["smtp_code"]=>
          string(0) ""
          ["smtp_code_ex"]=>
          string(0) ""
        }
        ["helo_rply":protected]=>
        NULL
        ["server_caps":protected]=>
        NULL
        ["last_reply":protected]=>
        string(122) "454 TLS connection failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown (#4.3.0)
    "
      }
      ["to":protected]=>
      array(1) {
        [0]=>
        array(2) {
          [0]=>
          string(20) "**myname**@gmail.com"
          [1]=>
          string(0) ""
        }
      }
      ["cc":protected]=>
      array(0) {
      }
      ["bcc":protected]=>
      array(0) {
      }
      ["ReplyTo":protected]=>
      array(0) {
      }
      ["all_recipients":protected]=>
      array(1) {
        ["**myname**@gmail.com"]=>
        bool(true)
      }
      ["attachment":protected]=>
      array(0) {
      }
      ["CustomHeader":protected]=>
      array(0) {
      }
      ["lastMessageID":protected]=>
      string(49) "<8119a4d0b35439df7198f036e9f4d43e@domain.co.il>"
      ["message_type":protected]=>
      string(5) "plain"
      ["boundary":protected]=>
      array(3) {
        [1]=>
        string(35) "b1_8119a4d0b35439df7198f036e9f4d43e"
        [2]=>
        string(35) "b2_8119a4d0b35439df7198f036e9f4d43e"
        [3]=>
        string(35) "b3_8119a4d0b35439df7198f036e9f4d43e"
      }
      ["language":protected]=>
      array(19) {
        ["authenticate"]=>
        string(35) "SMTP Error: Could not authenticate."
        ["connect_host"]=>
        string(43) "SMTP Error: Could not connect to SMTP host."
        ["data_not_accepted"]=>
        string(30) "SMTP Error: data not accepted."
        ["empty_message"]=>
        string(18) "Message body empty"
        ["encoding"]=>
        string(18) "Unknown encoding: "
        ["execute"]=>
        string(19) "Could not execute: "
        ["file_access"]=>
        string(23) "Could not access file: "
        ["file_open"]=>
        string(33) "File Error: Could not open file: "
        ["from_failed"]=>
        string(35) "The following From address failed: "
        ["instantiate"]=>
        string(36) "Could not instantiate mail function."
        ["invalid_address"]=>
        string(15) "Invalid address"
        ["mailer_not_supported"]=>
        string(25) " mailer is not supported."
        ["provide_address"]=>
        string(54) "You must provide at least one recipient email address."
        ["recipients_failed"]=>
        string(45) "SMTP Error: The following recipients failed: "
        ["signing"]=>
        string(15) "Signing Error: "
        ["smtp_connect_failed"]=>
        string(22) "SMTP connect() failed."
        ["smtp_error"]=>
        string(19) "SMTP server error: "
        ["variable_set"]=>
        string(30) "Cannot set or reset variable: "
        ["extension_missing"]=>
        string(19) "Extension missing: "
      }
      ["error_count":protected]=>
      int(2)
      ["sign_cert_file":protected]=>
      string(0) ""
      ["sign_key_file":protected]=>
      string(0) ""
      ["sign_extracerts_file":protected]=>
      string(0) ""
      ["sign_key_pass":protected]=>
      string(0) ""
      ["exceptions":protected]=>
      bool(true)
      ["uniqueid":protected]=>
      string(32) "8119a4d0b35439df7198f036e9f4d43e"
    }
    The SMTP debugging output is shown below:
    2016-04-05 06:48:05	Connection: opening to **SMTP SERVER IP ADDRESS**:25, timeout=300, options=array (
                       	                  )
    2016-04-05 06:48:05	Connection: opened
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was ""
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "220 Ready to receive mail -=- ESMTP
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "220 Ready to receive mail -=- ESMTP
                       	                  "
    2016-04-05 06:48:05	SERVER -> CLIENT: 220 Ready to receive mail -=- ESMTP
    2016-04-05 06:48:05	CLIENT -> SERVER: EHLO domain.co.il
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was ""
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "250-Ready to receive mail -=-
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "250-Ready to receive mail -=-
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was "250-Ready to receive mail -=-
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "250-AUTH=LOGIN PLAIN
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "250-STARTTLS
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  250-STARTTLS
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  250-STARTTLS
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "250-PIPELINING
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  250-STARTTLS
                       	                  250-PIPELINING
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  250-STARTTLS
                       	                  250-PIPELINING
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "250 8BITMIME
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  250-STARTTLS
                       	                  250-PIPELINING
                       	                  250 8BITMIME
                       	                  "
    2016-04-05 06:48:05	SERVER -> CLIENT: 250-Ready to receive mail -=-
                       	                  250-AUTH LOGIN PLAIN
                       	                  250-AUTH=LOGIN PLAIN
                       	                  250-STARTTLS
                       	                  250-PIPELINING
                       	                  250 8BITMIME
    2016-04-05 06:48:05	CLIENT -> SERVER: STARTTLS
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was ""
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "220 ready for tls
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "220 ready for tls
                       	                  "
    2016-04-05 06:48:05	SERVER -> CLIENT: 220 ready for tls
    2016-04-05 06:48:05	SMTP Error: Could not connect to SMTP host.
    2016-04-05 06:48:05	CLIENT -> SERVER: QUIT
    2016-04-05 06:48:05	SMTP -> get_lines(): $data was ""
    2016-04-05 06:48:05	SMTP -> get_lines(): $str is "454 TLS connection failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown (#4.3.0)
                       	                  "
    2016-04-05 06:48:05	SMTP -> get_lines(): $data is "454 TLS connection failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown (#4.3.0)
                       	                  "
    2016-04-05 06:48:05	SERVER -> CLIENT: 454 TLS connection failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown (#4.3.0)
    2016-04-05 06:48:05	SMTP ERROR: QUIT command failed: 454 TLS connection failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown (#4.3.0)
    2016-04-05 06:48:05	Connection: closed
    2016-04-05 06:48:05	SMTP Error: Could not connect to SMTP host.

    https://wordpress.org/plugins/wp-mail-smtp/

Viewing 9 replies - 16 through 24 (of 24 total)
  • Found a site with more details. This is caused by an incorrect SSL-certficate on the mail server. PHP5.6 has issues with that, where 5.5 didn’t.

    Why can’t I no longer send email from WordPress via SMTP after upgrading to PHP 5.6?

    The WP-Mail-SMTP didn’t work for me, but “SMTP Mailer v1.0.1” is fine (I am not using Encryption or Authentication). I have WP 4.5.3 and PHP 5.6.12.

    Yes me too I used SMTP Mailer and it works, thanks to you Studiotwo.

    Tried WP-Mailr-SMTP didn’t work for me.

    This is what I did
    Once installed the plugin,
    Go to setting:

    SMTP Host – mail.yourprimarydomainname.com (Not any domain name just your package primary domain name-they share the servers)

    SMTP Authentication – False

    SMTP Username – the name of your cpanel (primary domain name cpanel)

    SMTP Password – password of your cpanel

    Type of Encryption – No Encryption

    SMTP Port – 25 (if you’re using wordpress) if you don’t know ask your hosting company

    From Email Address – any email
    From Name – Your name/company

    Have Fun!

    WHOOOOHOOO! It works!

    The SMTP Mailer plugin works like a charm. I had to set it up a bit different than your comment @noah, but it works!

    THe changes I made: I had to set SMTP authentication to ‘True’ (what is the point of filling in the SMTP username and password if set to false?).
    Type of encryption: TLS
    SMTP Port: 587 (because TLS)
    SMTP Host: not my primary domainname but my one from my hosting provider (mail.<hostingprovider>.nl).

    Thanks a lot for your help guys!

    schmickler83

    (@schmickler83)

    Thank you @studiotwo this advice worked for me!

    Hi Guys,
    There are 2-options under ‘Authentication’ . Test the test email by altering the options. Hope it will solve the problem.

    Hello!

    Use SMTPSecure=’ssl’ port:465 or tls with port:587;

    It work

    Oh someone shoot me or end my existence! I have tried all of this, every plugin for SMTP, talked to GoDaddy today, which was useless, and still can’t get my gmail to work on my domain with WP. It used to!

    Any other options someone has found?

    Did you try this one? https://wordpress.org/plugins/smtp-mailer/
    I always seem to have luck with it.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘SMTP Error: Could not connect to SMTP host.’ is closed to new replies.