php - Connecting to Gmail via Horde_Imap_Client -


i have tried connect mit private google apps work inbox via imap using horde_imap_client. have used following config:

$config = array(     'username' => $username,     'password' => $password,     'hostspec' => 'imap.gmail.com',     'port' => '993',     'secure' => true,     "debug" => "imap.log",     "debug_literal" => true ); 

i tried ssl, sslv2, sslv3 , tls secure value. exception got error when communicating mail server. , imap.log showed me this

------------------------------ >> 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. ------------------------------ 

i tried allowing "insecure apps" in google account result same. clues? connection works fine our in-house imap server , office365 imap server

change

'secure' => true, 

to

'secure' => 'tlsv1', 

this force tlsv1 connections.

i ran same problem myself. i posted horde mailing list able resolve issue day later on own above change.


Comments