我已经尝试连接到麻省理工学院私人以及我的谷歌应用程序的工作收件箱通过IMAP使用Horde_Imap_Client。我使用了以下配置:
$config = array(
'username' => $username,
'password' => $password,
'hostspec' => 'imap.gmail.com',
'port' => '993',
'secure' => true,
"debug" => "imap.log",
"debug_literal" => true
);我还尝试了ssl、sslv2、sslv3和tls作为安全值。我得到的例外是Error when communicating with the mail server.,而imap.log只给我看了这个
------------------------------
>> Thu, 28 Jan 2016 18:29:14 +0100
>> Connection to: imap://imap.gmail.com:993/
>> Server connection took 0.0156 seconds.
>> Slow Command: 10.018 seconds
>> ERROR: read/timeout error.
------------------------------我也尝试允许“不安全的应用程序”在我的谷歌帐户,但结果是一样的。有什么线索吗?该连接与我们的内部IMAP服务器和office365 IMAP服务器运行良好。
发布于 2016-08-19 03:52:20
变化
'secure' => true,至
'secure' => 'tlsv1',这将强制TLSv1连接。
我自己也遇到了同样的问题。我发到部落邮件列表上了,但是我自己能够通过上面的改变来实现一天后解决这个问题。
https://stackoverflow.com/questions/35081369
复制相似问题