Skip to content

Conversation

@Sebbo94BY
Copy link
Collaborator

@Sebbo94BY Sebbo94BY commented Jan 10, 2022

IMAP stream can be an IMAP resource or IMAP\Connection object. See https://www.php.net/manual/en/migration81.incompatible.php for further information.

Looks like as this has been forgotten when adding PHP 8.1 support in the past.

Solves #655.


Tested with different PHP major versions and the identical code: All versions were able to get the same emails incl. attachments and it always took around 10 seconds for 25 emails.

$ /c/PHP/7.3.12-nts/php.exe testing.php
Trying to connect to '{outlook.office365.com:993/imap/ssl}INBOX'...
Found 25 email(s)...
Total attachments: 26
time for getting mail Is: 9.846657037735 sec.
$ /c/PHP/7.4.26-nts/php.exe testing.php
Trying to connect to '{outlook.office365.com:993/imap/ssl}INBOX'...
Found 25 email(s)...
Total attachments: 26
time for getting mail Is: 10.306457996368 sec.
$ /c/PHP/8.0.13-nts/php.exe testing.php
Trying to connect to '{outlook.office365.com:993/imap/ssl}INBOX'...
Found 25 email(s)...
Total attachments: 26
time for getting mail Is: 9.220538854599 sec.
$ /c/PHP/8.1.0-nts/php.exe testing.php
Trying to connect to '{outlook.office365.com:993/imap/ssl}INBOX'...
Found 25 email(s)...
Total attachments: 26
time for getting mail Is: 9.7392268180847 sec.

IMAP stream can be an IMAP resource or IMAP\Connection object. See https://www.php.net/manual/en/migration81.incompatible.php for further information.
@Sebbo94BY Sebbo94BY merged commit e630d64 into master Jan 10, 2022
@Sebbo94BY Sebbo94BY deleted the 655-IMAP-connection-slow-using-PHP-8.1.x branch January 10, 2022 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants