对等证书CN = ubuntu'与预期的CN = localhost'不匹配

时间:2019-08-12 11:38:57

标签: ssl

当我将phpmailer与postfix发送邮件本地服务器一起使用时,我在phpmailer中发现以下错误。我能够使用mail命令和纯PHP脚本成功发送电子邮件。

我认为这与SSL证书有关。我已经看过phpmailer的文档。谁能特别说出我在019-08-12 11:36:27 Connection: opening to localhost:25, timeout=300, options=array() 2019-08-12 11:36:27 Connection: opened 2019-08-12 11:36:27 SERVER -> CLIENT: 220 demo.xxx.xx.xx ESMTP Postfix (Ubuntu) 2019-08-12 11:36:27 CLIENT -> SERVER: EHLO 172.22.120.185 2019-08-12 11:36:27 SERVER -> CLIENT: 250-demo.xxx.xx.xx250-PIPELINING250-SIZE 10240000250-VRFY250-ETRN250-STARTTLS250-ENHANCEDSTATUSCODES250-8BITMIME250-DSN250 SMTPUTF8 2019-08-12 11:36:27 CLIENT -> SERVER: STARTTLS 2019-08-12 11:36:27 SERVER -> CLIENT: 220 2.0.0 Ready to start TLS 2019-08-12 11:36:27 Connection failed. Error #2: stream_socket_enable_crypto(): Peer certificate CN=`ubuntu' did not match expected CN=`localhost' [/var/www/html/test/vendor/phpmailer/phpmailer/src/SMTP.php line 405] SMTP Error: Could not connect to SMTP host. 2019-08-12 11:36:27 CLIENT -> SERVER: QUIT 2019-08-12 11:36:27 2019-08-12 11:36:27 2019-08-12 11:36:27 Connection: closed SMTP Error: Could not connect to SMTP host. Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host. 内部要做的事情?还是还有其他问题?

错误是:

pivot

0 个答案:

没有答案