總是time out的原因是什么???
2016-10-21 00:19:22 Connection: opening to smtp.aliyun.com:25, timeout=300, options=array ( ) 2016-10-21 00:19:43 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client() [function.stream-socket-client]: unable to connect to smtp.aliyun.com:25 (由于連接方在一段時間后沒有正確答復或連接的主機沒有反應,連接嘗試失敗。 ) 2016-10-21 00:19:43 SMTP ERROR: Failed to connect to server: 由于連接方在一段時間后沒有正確答復或連接的主機沒有反應,連接嘗試失敗。 (10060) 2016-10-21 00:19:43 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Message could not be sent.Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
上面是開了那個debug給的反饋,用smtp.gmail.com不行,用smtp.aliyun.com也不行,都是time out。
2016-10-22
stream_socket_client這個函數(shù)單獨用的時候會出問題嗎
2016-10-21
你的PHP套件開啟了openssl模塊的支持嗎?