相关疑难解决方法(0)

PHP - 使用STARTTLS和自签名证书的Swiftmailer

我正在尝试使用STARTTLS发送带有php和swiftmailer的电子邮件,但我收到了证书错误.我具有SMTP服务器的root访问权限,并且使用的证书是自签名的.我在两台机器上使用Debian(Web服务器和smtp服务器)

PHP message: PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in [..]/lib/classes/Swift/Transport/StreamBuffer.php on line 97 PHP message: PHP Fatal error: Uncaught exception 'Swift_TransportException' with message 'Unable to connect with TLS encryption' in [..]/lib/classes/Swift/Transport/EsmtpTransport.php:294

我是否需要在某个地方添加自己的证书才能接受它?或者这是一些OpenSSL配置错误?

php smtp certificate self-signed swiftmailer

12
推荐指数
3
解决办法
2万
查看次数

标签 统计

certificate ×1

php ×1

self-signed ×1

smtp ×1

swiftmailer ×1