2016-05-05 28 views
0

以下に示すように、SMTP接続エラーを表示するPHPMailerに奇妙な問題があります。何が原因でしょうか? GmailのSMTPサーバーを使用しているときに機能し、ローカルのメール機能でも動作します。サーバー上のRoundcubeは正常に送信されます。それはちょうどPHPMailerのようです。私の知る限り、すべての設定は正しいです。それはTLSを使用しており、私は別のポートを試しました。正しいポートには、次のエラーが表示さ:PHPMailer SMTPエラー:SMTPホストに接続できませんでした

2016-05-05 21:58:47 Connection: opening to mail.myserver.com:587, timeout=300, options=array (
            ) 
2016-05-05 21:58:47 Connection: opened 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "" 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "220 sys.myserver.com ESMTP Exim 4.72 Thu, 05 May 2016 17:58:50 -0400 
             " 
2016-05-05 21:58:52 SERVER -> CLIENT: 220 sys.myserver.com ESMTP Exim 4.72 Thu, 05 May 2016 17:58:50 -0400 
2016-05-05 21:58:52 CLIENT -> SERVER: EHLO localhost 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "" 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "250-sys.myserver.com Hello ***********] 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "250-sys.myserver.com Hello cpc68331-cdif16-2-0-cust906.5-1.cable.virginm.net [86.3.207.139] 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "250-SIZE 52428800 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "250-sys.myserver.com Hello cpc68331-cdif16-2-0-cust906.5-1.cable.virginm.net [86.3.207.139] 
             250-SIZE 52428800 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "250-PIPELINING 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "250-sys.myserver.com Hello ***************************] 
             250-SIZE 52428800 
             250-PIPELINING 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "250-AUTH PLAIN LOGIN 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "250-sys.myserver.com Hello ****************************] 
             250-SIZE 52428800 
             250-PIPELINING 
             250-AUTH PLAIN LOGIN 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "250-STARTTLS 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "250-sys.myserver.com Hello ******************] 
             250-SIZE 52428800 
             250-PIPELINING 
             250-AUTH PLAIN LOGIN 
             250-STARTTLS 
             " 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "250 HELP 
             " 
2016-05-05 21:58:52 SERVER -> CLIENT: 250-sys.myserver.com Hello ***************] 
             250-SIZE 52428800 
             250-PIPELINING 
             250-AUTH PLAIN LOGIN 
             250-STARTTLS 
             250 HELP 
2016-05-05 21:58:52 CLIENT -> SERVER: STARTTLS 
2016-05-05 21:58:52 SMTP -> get_lines(): $data is "" 
2016-05-05 21:58:52 SMTP -> get_lines(): $str is "220 TLS go ahead 
             " 
2016-05-05 21:58:52 SERVER -> CLIENT: 220 TLS go ahead 
2016-05-05 21:58:52 SMTP Error: Could not connect to SMTP host. 
2016-05-05 21:58:52 CLIENT -> SERVER: QUIT 
2016-05-05 21:58:53 SMTP -> get_lines(): $data is "" 
2016-05-05 21:58:53 SMTP -> get_lines(): $str is "����221 sys.myserver.com closing connection 
             " 
2016-05-05 21:58:53 SMTP -> get_lines(): $data is "����221 sys.myserver.com closing connection 
             " 
2016-05-05 21:58:53 SMTP -> get_lines(): $str is "" 
2016-05-05 21:58:53 SERVER -> CLIENT: ����221 sys.myserver.com closing connection 
2016-05-05 21:58:53 SMTP ERROR: QUIT command failed: ����221 sys.myserver.com closing connection 


---------- 


2016-05-05 21:58:53 Connection: closed 
2016-05-05 21:58:53 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting 
{"success":1,"id":"3391"} 

答えて

0

これはthe troubleshooting guideで覆われています。 STARTTLSの直後に失敗します。これは通常、メールサーバーが無効なSSL証明書を発行していることを示します。期限切れ、自己署名、またはホスト名と一致しません。実際の解決策は証明書を修正することですが、ガイドで検証を無効にする方法について説明しています。

おそらくgmailはSSL設定が壊れていないため動作していますが、roundcubeはおそらくlocalhostにTLSなしで(mail()経由で)送信しているため、問題は発生しません。

関連する問題