猿问

解决 PHPMailer 错误 SMTP 连接失败

如何解决 phpmailer 中的这个错误?这几个月前我测试时从未发生过。


2019-06-18 15:26:33 Connection: opening to ssl://localhost:465, timeout=300, options=array ( ) 


2019-06-18 15:26:33 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): Peer certificate CN=`server18.hostingraja.org' did not match expected CN=`localhost' 

2019-06-18 15:26:33 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): Failed to enable crypto 

2019-06-18 15:26:33 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) 

2019-06-18 15:26:33 SMTP ERROR: Failed to connect to server: (0) 

2019-06-18 15:26:33 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting`


肥皂起泡泡
浏览 602回答 1
1回答
随时随地看视频慕课网APP
我要回答