WP Mail SMTP 版本 1.5.1 不发送测试邮件
WP Mail SMTP Version 1.5.1 not sending test Mails
我已经在我的 wordpress 网站上配置了 WP Mail SMTP 插件,但是在配置之后我正在测试插件是否工作,同时测试它给出 bel;low 错误:
add_action( 'phpmailer_init', 'reconfigure_smtp' );
function reconfigure_smtp( $phpmailer ) {
$SMTPhost = get_option('smtp_host');
$SMTPport = get_option('smtp_port');
$FromEmail = get_option('mail_from');
$FromName = get_option('mail_from_name');
$phpmailer->isSMTP();
$phpmailer->Host =$SMTPhost;
$phpmailer->Port = $SMTPport;
$phpmailer->From = $FromEmail;
$phpmailer->FromName = $FromName;
}
单击此处查看完整的调试错误日志:
WordPress: 5.1.1
WordPress MS: No
PHP: 7.0.33-5+ubuntu18.04.1+deb.sury.org+1
WP Mail SMTP: 1.4.2
Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Host: smtp.gmail.com
Port: 465
SMTPSecure: ssl
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)
Server:
OpenSSL: OpenSSL 1.1.1b 26 Feb 2019
Apache.mod_security: No
SMTP Debug:
2019-07-16 09:54:17 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array (
)
2019-07-16 09:54:17 Connection: opened
2019-07-16 09:54:17 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:17 CLIENT -> SERVER: EHLO www.ZZZZZ.com
2019-07-16 09:54:17 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [34.200.115.143]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
2019-07-16 09:54:17 CLIENT -> SERVER: AUTH LOGIN
2019-07-16 09:54:17 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2019-07-16 09:54:17 CLIENT -> SERVER: Y29udGFjdGFoZXhAZ21haWwuY29t
2019-07-16 09:54:17 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2019-07-16 09:54:17 CLIENT -> SERVER: YTFoMmUzeDRAIyQ=
2019-07-16 09:54:18 SERVER -> CLIENT: 534-5.7.14 Please
534-5.7.14 log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:18 SMTP ERROR: Password command failed: 534-5.7.14 Please
534-5.7.14 log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:18 SMTP Error: Could not authenticate.
2019-07-16 09:54:18 CLIENT -> SERVER: QUIT
2019-07-16 09:54:18 SERVER -> CLIENT: 221 2.0.0 closing connection g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:18 Connection: closed
2019-07-16 09:54:18 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
发送测试邮件时出现问题。
无法连接到 SMTP 主机。
这意味着您的网络服务器无法连接到 smtp.gmail.com。
通常由于以下原因之一返回此错误:
-SMTP 设置不正确(错误的端口、安全设置、错误的主机)。
- 您的网络服务器正在阻止连接。
-您的 SMTP 主机拒绝连接。
建议的后续步骤:
三重检查您的 SMTP 设置,包括主机地址、电子邮件和密码、端口和安全性。
联系您的网络托管服务提供商并要求他们验证您的服务器是否可以使用 tls 加密连接到端口 587 上的 smtp.gmail.com。此外,询问他们是否防火墙或安全策略可能会阻止连接 - 许多共享主机会阻止某些端口。
注意:这是导致此问题的最常见原因。
联系您的 SMTP 主机以确认您使用的是正确的用户名和密码。
与您的 SMTP 主机确认您的帐户有权使用外部连接发送电子邮件。
首先需要检查 SMTP 详细信息,例如(SMTP 主机、加密、SMTP 用户名和 SMTP 密码),然后需要在我们的 gmail 或 yahoo 设置中启用安全性较低的应用程序。
我已经在我的 wordpress 网站上配置了 WP Mail SMTP 插件,但是在配置之后我正在测试插件是否工作,同时测试它给出 bel;low 错误:
add_action( 'phpmailer_init', 'reconfigure_smtp' );
function reconfigure_smtp( $phpmailer ) {
$SMTPhost = get_option('smtp_host');
$SMTPport = get_option('smtp_port');
$FromEmail = get_option('mail_from');
$FromName = get_option('mail_from_name');
$phpmailer->isSMTP();
$phpmailer->Host =$SMTPhost;
$phpmailer->Port = $SMTPport;
$phpmailer->From = $FromEmail;
$phpmailer->FromName = $FromName;
}
单击此处查看完整的调试错误日志:
WordPress: 5.1.1
WordPress MS: No
PHP: 7.0.33-5+ubuntu18.04.1+deb.sury.org+1
WP Mail SMTP: 1.4.2
Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Host: smtp.gmail.com
Port: 465
SMTPSecure: ssl
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)
Server:
OpenSSL: OpenSSL 1.1.1b 26 Feb 2019
Apache.mod_security: No
SMTP Debug:
2019-07-16 09:54:17 Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array (
)
2019-07-16 09:54:17 Connection: opened
2019-07-16 09:54:17 SERVER -> CLIENT: 220 smtp.gmail.com ESMTP g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:17 CLIENT -> SERVER: EHLO www.ZZZZZ.com
2019-07-16 09:54:17 SERVER -> CLIENT: 250-smtp.gmail.com at your service, [34.200.115.143]
250-SIZE 35882577
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
2019-07-16 09:54:17 CLIENT -> SERVER: AUTH LOGIN
2019-07-16 09:54:17 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2019-07-16 09:54:17 CLIENT -> SERVER: Y29udGFjdGFoZXhAZ21haWwuY29t
2019-07-16 09:54:17 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2019-07-16 09:54:17 CLIENT -> SERVER: YTFoMmUzeDRAIyQ=
2019-07-16 09:54:18 SERVER -> CLIENT: 534-5.7.14 Please
534-5.7.14 log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:18 SMTP ERROR: Password command failed: 534-5.7.14 Please
534-5.7.14 log in via your web browser and then try again.
534-5.7.14 Learn more at
534 5.7.14 https://support.google.com/mail/answer/78754 g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:18 SMTP Error: Could not authenticate.
2019-07-16 09:54:18 CLIENT -> SERVER: QUIT
2019-07-16 09:54:18 SERVER -> CLIENT: 221 2.0.0 closing connection g35sm11776763qtg.92 - gsmtp
2019-07-16 09:54:18 Connection: closed
2019-07-16 09:54:18 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
发送测试邮件时出现问题。
无法连接到 SMTP 主机。
这意味着您的网络服务器无法连接到 smtp.gmail.com。
通常由于以下原因之一返回此错误:
-SMTP 设置不正确(错误的端口、安全设置、错误的主机)。 - 您的网络服务器正在阻止连接。 -您的 SMTP 主机拒绝连接。
建议的后续步骤: 三重检查您的 SMTP 设置,包括主机地址、电子邮件和密码、端口和安全性。 联系您的网络托管服务提供商并要求他们验证您的服务器是否可以使用 tls 加密连接到端口 587 上的 smtp.gmail.com。此外,询问他们是否防火墙或安全策略可能会阻止连接 - 许多共享主机会阻止某些端口。 注意:这是导致此问题的最常见原因。 联系您的 SMTP 主机以确认您使用的是正确的用户名和密码。 与您的 SMTP 主机确认您的帐户有权使用外部连接发送电子邮件。
首先需要检查 SMTP 详细信息,例如(SMTP 主机、加密、SMTP 用户名和 SMTP 密码),然后需要在我们的 gmail 或 yahoo 设置中启用安全性较低的应用程序。