【发布时间】:2015-01-09 20:29:19
【问题描述】:
我正在尝试使用 STARTTLS 使用 php 和 swiftmailer 发送电子邮件,但出现证书错误。我对 SMTP 服务器具有 root 访问权限,并且使用的证书是自签名的。 我在两台机器(Web 服务器和 smtp 服务器)上都使用 Debian
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 swiftmailer self-signed