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

PHP Fatal error: Uncaught Error: Call to protected method PhpImap\Mailbox::disconnect() #702

Open
SalimF opened this issue Jan 23, 2023 · 0 comments

Comments

@SalimF
Copy link

SalimF commented Jan 23, 2023

Environment (please complete the following information):

  • PHP IMAP version: [5.0.1]
  • PHP Version: [8.2 - 7.4 ]
  • Type of execution: CLI

Your Text
I install the library using compser
composer require php-imap/php-imap

and then I downloaded the file get_and_parse_unseen_emails.php I only changed this line to point correctly to the autoloader

require_once __DIR__.'/vendor/autoload.php';
and I added the correct credentials from my yahoo account (I used thunderbird settings).
but is still won't work

I was able to get the messages but, looks like the example I used do not work if there is no unread emails or there is no attachment.

But the final error I got I think it should not happen related to method PhpImap\Mailbox::disconnect() , should I not use this method if implement it on my projects?

PHP Fatal error:  Uncaught Error: Call to protected method PhpImap\Mailbox::disconnect() from context '' in /run/media/pc/hdd/www/win10-bots/src/mail/unseen_emails.php:73
Stack trace:
#0 {main}
  thrown in /run/media/pc/hdd/www/win10-bots/src/mail/unseen_emails.php on line 73
 
PHP Fatal error:  Uncaught Error: Call to protected method PhpImap\Mailbox::disconnect() from context '' in /run/media/pc/4962-FE80/www/win10-bots/src/mail/unseen_emails.php:69
Stack trace:
#0 {main}
  thrown in /run/media/pc/hdd/www/win10-bots/src/mail/unseen_emails.php on line 69
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

No branches or pull requests

1 participant