Zend_Mail_Storage_Imap fails with connection timeout

For programming and general questions on Zend Framework

Zend_Mail_Storage_Imap fails with connection timeout

Postby gentrobot on Thu Dec 27, 2012 1:30 pm

I have written some code to fetch emails from a Gmail mailbox using Zend_Storage_Mail_Imap library. Till now, it was running fine on the development server (where imap_open was disabled). After I moved it to production(imap_open is enabled), the script has stoppped to work. Do I need to disable imap_open for it to work ?

The actual error message is:
Zend_Mail_Protocol_Exception with message 'cannot connect to host; error = Connection Timed Out (errno = 110)'


The Imap connection config is like:

Code: Select all
array(
'host'=>'imap(dot)gmail(dot)com',
'port'=>'993',
'ssl'=>true,
'user'=>'myuser',
'password'=>'mypassword'
);

Apparently, the issue might be of fsockopen(). But, the corresponding values in PHP.ini are:

Code: Select all
allow_url_fopen = on
default_socket_timeout = 600 (on production) and 60 (on development)


I did find out, that inside the /library/Zend/Mail/Protocol/Imap.php, the timeout is mentioned as "const TIMEOUT_CONNECTION = 30". Should I increase this ? Though, the script works on development, even when I set this value to 1.
gentrobot
 
Posts: 1
Joined: Thu Dec 27, 2012 1:25 pm

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 9 guests