0
votes

I am using the WP mail SMTP (0.11.2) plugin.

usingWordpress4.9.1 When I sent my email it gives me this error SMTP -> ERROR: Failed to connect to server or Could not authenticate.

How can I fix it?

C:\wamp64\www\wordpress\wp-content\plugins\wp-mail-smtp\wp_mail_smtp.php:258:boolean false

Here is my testmail debuging info:

PHPMailer Object
(
[Version] => 5.2.22
[Priority] => 
[CharSet] => UTF-8
[ContentType] => text/plain
[Encoding] => 8bit
[ErrorInfo] => SMTP connect() failed. 
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
[From] => [email protected]
[FromName] => 搖滾俱樂部
[Sender] => 
[ReturnPath] => 
[Subject] => WP Mail SMTP: Test mail to [email protected]
[Body] => 這封測試郵件由 WordPress 外掛 WP Mail SMTP 自動產生。
[AltBody] => 
[Ical] => 
[MIMEBody:protected] => 這封測試郵件由 WordPress 外掛 WP Mail SMTP 自動產生。

[MIMEHeader:protected] => Date: Fri, 8 Dec 2017 14:51:09 +0000
To: [email protected]
From: =?UTF-8?B?5pCW5ru+5L+x5qiC6YOo?= 
Subject: WP Mail SMTP: Test mail to [email protected]
Message-ID: <[email protected]>
X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit


[mailHeader:protected] => 
[WordWrap] => 0
[Mailer] => smtp
[Sendmail] => /usr/sbin/sendmail
[UseSendmailOptions] => 1
[PluginDir] => 
[ConfirmReadingTo] => 
[Hostname] => 
[MessageID] => 
[MessageDate] => Fri, 8 Dec 2017 14:51:09 +0000
[Host] => smtp.gmail.com
[Port] => 465
[Helo] => 
[SMTPSecure] => ssl
[SMTPAutoTLS] => 1
[SMTPAuth] => 1
[SMTPOptions] => Array
    (
    )

[Username] => [email protected]
[Password] => xxxxxxxxxxxx
[AuthType] => 
[Realm] => 
[Workstation] => 
[Timeout] => 300
[SMTPDebug] => 0
[Debugoutput] => echo
[SMTPKeepAlive] => 
[SingleTo] => 
[SingleToArray] => Array
    (
    )

[do_verp] => 
[AllowEmpty] => 
[LE] => 

[DKIM_selector] => 
[DKIM_identity] => 
[DKIM_passphrase] => 
[DKIM_domain] => 
[DKIM_private] => 
[DKIM_private_string] => 
[action_function] => 
[XMailer] => 
[smtp:protected] => SMTP Object
    (
        [Version] => 5.2.22
        [SMTP_PORT] => 25
        [CRLF] => 

        [do_debug] => 0
        [Debugoutput] => echo
        [do_verp] => 
        [Timeout] => 300
        [Timelimit] => 300
        [smtp_transaction_id_patterns:protected] => Array
            (
                [exim] => /[0-9]{3} OK id=(.*)/
                [sendmail] => /[0-9]{3} 2.0.0 (.*) Message/
                [postfix] => /[0-9]{3} 2.0.0 Ok: queued as (.*)/
            )

        [smtp_conn:protected] => 
        [error:protected] => Array
            (
                [error] => 
                [detail] => 
                [smtp_code] => 
                [smtp_code_ex] => 
            )

        [helo_rply:protected] => 
        [server_caps:protected] => 
        [last_reply:protected] => 
    )

[to:protected] => Array
    (
        [0] => Array
            (
                [0] => [email protected]
                [1] => 
            )

    )

[cc:protected] => Array
    (
    )

[bcc:protected] => Array
    (
    )

[ReplyTo:protected] => Array
    (
    )

[all_recipients:protected] => Array
    (
        [[email protected]] => 1
    )

[RecipientsQueue:protected] => Array
    (
    )

[ReplyToQueue:protected] => Array
    (
    )

[attachment:protected] => Array
    (
    )

[CustomHeader:protected] => Array
    (
    )

[lastMessageID:protected] => <[email protected]>
[message_type:protected] => plain
[boundary:protected] => Array
    (
        [1] => b1_1d6e4a91953547c850de852e798ccbba
        [2] => b2_1d6e4a91953547c850de852e798ccbba
        [3] => b3_1d6e4a91953547c850de852e798ccbba
    )

[language:protected] => Array
    (
        [authenticate] => SMTP Error: Could not authenticate.
        [connect_host] => SMTP Error: Could not connect to SMTP host.
        [data_not_accepted] => SMTP Error: data not accepted.
        [empty_message] => Message body empty
        [encoding] => Unknown encoding: 
        [execute] => Could not execute: 
        [file_access] => Could not access file: 
        [file_open] => File Error: Could not open file: 
        [from_failed] => The following From address failed: 
        [instantiate] => Could not instantiate mail function.
        [invalid_address] => Invalid address: 
        [mailer_not_supported] =>  mailer is not supported.
        [provide_address] => You must provide at least one recipient email address.
        [recipients_failed] => SMTP Error: The following recipients failed: 
        [signing] => Signing Error: 
        [smtp_connect_failed] => SMTP connect() failed.
        [smtp_error] => SMTP server error: 
        [variable_set] => Cannot set or reset variable: 
        [extension_missing] => Extension missing: 
    )

[error_count:protected] => 2
[sign_cert_file:protected] => 
[sign_key_file:protected] => 
[sign_extracerts_file:protected] => 
[sign_key_pass:protected] => 
[exceptions:protected] => 1
[uniqueid:protected] => 1d6e4a91953547c850de852e798ccbba

)

Heading

2
Go through the recommendations in the troubleshooting guide. Post the debug output you get with SMTPDebug = 3.Synchro
What does that mean SMTPDebug = 3? sorry for my bad English and technic.Ray55660010
Look at the code examples for how to use it.Synchro
SMTP Error: Could not connect to SMTP host.CLIENT -> SERVER: QUITRay55660010

2 Answers

0
votes

Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ( )

Connection: Failed to connect to server.

Error number 2. "Error notice: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failedConnection: Failed to connect to server.

Error number 2. "Error notice: stream_socket_client(): Failed to enable cryptoConnection: Failed to connect to server.

Error number 2. "Error notice: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error)

SMTP ERROR: Failed to connect to server: (0)SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

0
votes

Try this plugin https://wordpress.org/plugins/blastex and send email without local smtp server !

Probably self signed certificate on smtp server !!!