AMH配置SMTP为何一直报错?

AMH,系统debian,PHP8.2,mysql8.0,NGINX1.20,在wordpress里配置SMTP提示:
发送测试邮件时出现问题。

服务器证书配置错误。
这意味着服务器上的OpenSSL无法验证主机证书。

发生这种情况有几个原因。 可能是主机证书配置错误,或者该服务器的OpenSSL使用的是过时的CA捆绑软件。

建议的处理步骤:
验证主机的SSL证书是否有效。
请联系您的主机支持,向他们提供下面的 "用于调试的完整错误日志",并附上此链接。

Versions:
WordPress: 6.4.3
WordPress MS: No
PHP: 8.2.13
WP Mail SMTP: 3.11.1

Params:
Mailer: smtp
Constants: No
Conflicts: FluentSMTP
ErrorInfo: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server
Host: smtp.zoho.com.cn
Port: 465
SMTPSecure: ssl
SMTPAutoTLS: bool(false)
SMTPAuth: bool(true)

Server:
OpenSSL: OpenSSL 1.1.1w 11 Sep 2023

Debug:
Email Source: WP Mail SMTP
Mailer: 其他 SMTP
SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server

SMTP Debug:
2024-02-02 10:45:50 Connection: opening to ssl://smtp.zoho.com.cn:465, timeout=300, options=array()

2024-02-02 10:45:51 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [/home/wwwroot/xiaobao/domain/www.azmnaturalbeauty.com/web/wp-includes/PHPMailer/SMTP.php line 396]

2024-02-02 10:45:51 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [/home/wwwroot/xiaobao/domain/www.azmnaturalbeauty.com/web/wp-includes/PHPMailer/SMTP.php line 396]

2024-02-02 10:45:51 Connection failed. Error #2: stream_socket_client(): Unable to connect to ssl://smtp.zoho.com.cn:465 (Unknown error) [/home/wwwroot/xiaobao/domain/www.azmnaturalbeauty.com/web/wp-includes/PHPMailer/SMTP.php line 396]

2024-02-02 10:45:51 SMTP ERROR: Failed to connect to server: (0)

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

Deprecated: Creation of dynamic property FluentSmtpDb\QueryBuilder\QueryBuilderHandler::$adapter is deprecated in /home/wwwroot/xiaobao/domain/www.azmnaturalbeauty.com/web/wp-content/plugins/fluent-smtp/app/Services/wpfluent/src/QueryBuilder/QueryBuilderHandler.php on line 67

Deprecated: Creation of dynamic property FluentSmtpDb\QueryBuilder\QueryBuilderHandler::$adapterConfig is deprecated in /home/wwwroot/xiaobao/domain/www.azmnaturalbeauty.com/web/wp-content/plugins/fluent-smtp/app/Services/wpfluent/src/QueryBuilder/QueryBuilderHandler.php on line 68

Deprecated: Creation of dynamic property FluentSmtpDb\QueryBuilder\QueryBuilderHandler::$adapter is deprecated in /home/wwwroot/xiaobao/domain/www.azmnaturalbeauty.com/web/wp-content/plugins/fluent-smtp/app/Services/wpfluent/src/QueryBuilder/QueryBuilderHandler.php on line 67

Deprecated: Creation of dynamic property FluentSmtpDb\QueryBuilder\QueryBuilderHandler::$adapterConfig is deprecated in /home/wwwroot/xiaobao/domain/www.azmnaturalbeauty.com/web/wp-content/plugins/fluent-smtp/app/Services/wpfluent/src/QueryBuilder/QueryBuilderHandler.php on line 68

请问如何解决?

阅读 972
2 个回答
新手上路,请多包涵

在环境配置里手动增加一行openssl.cafile就好了,奇怪额是就我一个人遇到这个问题吗?大A加油优化啊,现在BT那么难用是翻身的好机会啊!

是的,ssl证书校验没通过,可以指定ca文件,到『网站』环境配置,编辑配置,手动加一行指定cafile,如:
openssl.cafile = /usr/local/amh-7.1/etc/ca-bundle-2023.crt

lnmp环境软件会考虑做些优化,也感谢反馈。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏