用webman写了一个发信api,发现二进制打包前可以发信,打包后提示网络报错
2023-10-11 14:05:14 Connection: opening to ssl://smtp.163.com:465, timeout=300, options=array()
2023-10-11 14:05:14 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 [phar:///www/wwwroot/mail.skyw.cc/build/webman.bin/vendor/phpmailer/phpmailer/src/SMTP.php line 397]
2023-10-11 14:05:14 Connection failed. Error #2: stream_socket_client(): Failed to enable crypto [phar:///www/wwwroot/mail.skyw.cc/build/webman.bin/vendor/phpmailer/phpmailer/src/SMTP.php line 397]
2023-10-11 14:05:14 Connection failed. Error #2: stream_socket_client(): Unable to connect to ssl://smtp.163.com:465 (Unknown error) [phar:///www/wwwroot/mail.skyw.cc/build/webman.bin/vendor/phpmailer/phpmailer/src/SMTP.php line 397]
2023-10-11 14:05:14 SMTP ERROR: Failed to connect to server: (0)
2023-10-11 14:05:14 SMTP Error: Could not connect to SMTP host. Failed to connect to server
Centos 7
webman最新版
最好把代码也贴出来
应该是证书的问题,去下载这个https://curl.se/ca/cacert.pem,改名放到/etc/ssl/certs/ca-certificates.crt,再试试就知道了