Answer the question
In order to leave comments, you need to log in
How to accurately set timeout for php imap_open?
I made a connection to imap yandex mail via cron, it works stably, but sometimes imap_open freezes tightly, without any error. The script can hang for a day in working condition and never end.
I connect by:
{imap.yandex.ru:993/ssl/novalidate-cert}INBOX
{imap.yandex.ru:993/imap/ssl}INBOX
set_time_limit(20);
ini_set("default_socket_timeout", 20);
imap_timeout(IMAP_READTIMEOUT, 20);
imap_timeout(IMAP_OPENTIMEOUT, 20);
imap_timeout(IMAP_WRITETIMEOUT, 20);
imap_timeout(IMAP_CLOSETIMEOUT, 20);
{imap.yandex.ru:143/imap/notls}INBOX
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question