Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imap_open() - timeout not working with ssl #17510

Open
Elompenta opened this issue Jan 18, 2025 · 1 comment
Open

imap_open() - timeout not working with ssl #17510

Elompenta opened this issue Jan 18, 2025 · 1 comment

Comments

@Elompenta
Copy link

Description

imap timeout ist not working if ssl is used in the connection.
In case you dont use used ssl then after 10s it will be aborted by timeout but its not working with ssl.

<?php
imap_timeout(IMAP_READTIMEOUT, 10);
imap_timeout(IMAP_OPENTIMEOUT, 10);
$imap_connect = imap_open("{mail.yahoo.com:993/ssl/novalidate-cert}", $user, $pwd);

Resulted in this output:

If i have used ssl then imap_open takes hell lot of time to return a response. timeout is ignored.

But I expected this output instead:

After 10s imap_open show show timeout even server address having ssl.

New Github isse from old bugreport: https://bugs.php.net/bug.php?id=61846

There was a note from [email protected] but nothing else happens.

It seems to me that ext/imap does the right thing, by calling
mail_parameters() to set the respective timeouts, and by calling
mail_open() to open the IMAP stream. If the timeout is not heeded
for some kinds of connections, that would appear to be a bug in
libc-client, but not in PHP.

PHP Version

PHP 8..15

Operating System

Debian 12.8

@NattyNarwhal
Copy link
Member

PHP 8.1 isn't supported anymore; does this happen with 8.3, or if you're using the imap PECL extension in 8.4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants