Wordpress4.9.1 SMTP无法正常工作

时间:2017-12-08 15:06:06

标签: wordpress smtp gmail phpmailer

我正在使用WP邮件SMTP(0.11.2)插件。

usingWordpress4.9.1 当我发送电子邮件时,它给了我这个错误SMTP - >错误:无法连接到服务器或无法进行身份验证。

我该如何解决?

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

这是我的testmail debuging信息:

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] => xxxxxxxxxx@gmail.com
[FromName] => 搖滾俱樂部
[Sender] => 
[ReturnPath] => 
[Subject] => WP Mail SMTP: Test mail to bb5566123com@yahoo.com.tw
[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: xxxxxxxxx@yahoo.com.tw
From: =?UTF-8?B?5pCW5ru+5L+x5qiC6YOo?= 
Subject: WP Mail SMTP: Test mail to bb5566123com@yahoo.com.tw
Message-ID: <1d6e4a91953547c850de852e798ccbba@club3.idv.tw>
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] => xxxxxxxxxxx@gmail.com
[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] => xxxxxxxxxx@yahoo.com.tw
                [1] => 
            )

    )

[cc:protected] => Array
    (
    )

[bcc:protected] => Array
    (
    )

[ReplyTo:protected] => Array
    (
    )

[all_recipients:protected] => Array
    (
        [xxxxxxxxxxx@yahoo.com.tw] => 1
    )

[RecipientsQueue:protected] => Array
    (
    )

[ReplyToQueue:protected] => Array
    (
    )

[attachment:protected] => Array
    (
    )

[CustomHeader:protected] => Array
    (
    )

[lastMessageID:protected] => <1d6e4a91953547c850de852e798ccbba@club3.idv.tw>
[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

标题

2 个答案:

答案 0 :(得分:0)

连接:打开ssl://smtp.gmail.com:465,timeout = 300,options = array( )

连接:无法连接到服务器。

错误编号2.&#34;错误通知:stream_socket_client(): SSL操作失败,代码为1. OpenSSL错误消息: 错误:14090086:SSL例程:ssl3_get_server_certificate:certificate verify failedConnection:无法连接到服务器。

错误编号2.&#34;错误通知:stream_socket_client():无法启用cryptoConnection:无法连接到服务器。

错误编号2.&#34;错误通知:stream_socket_client():无法连接到ssl://smtp.gmail.com:465(未知错误)

SMTP错误:无法连接到服务器:(0)SMTP连接()失败。 https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

答案 1 :(得分:0)

试试这个插件https://wordpress.org/plugins/blastex并发送没有本地smtp服务器的电子邮件!

可能是smtp服务器上的自签名证书!!!