-
-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Description
Describe the bug
When I want to get new messages from gmail is not working, I am using from example laravel integration.
To Reproduce
`<?php
namespace App\Console\Commands;
use Webklex\IMAP\Commands\ImapIdleCommand;
use Webklex\PHPIMAP\Message;
class CustomImapIdleCommand extends ImapIdleCommand {
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'custom_command';
/**
* Holds the account information
*
* @var string|array $account
*/
protected $account = "default";
/**
* Callback used for the idle command and triggered for every new received message
* @param Message $message
*/
public function onNewMessage(Message $message) {
$this->info("New message received: " . $message->subject);
}
}
`
Expected behavior
When I run php artisan custom_command I get new messages
Screenshots
Desktop / Server (please complete the following information):
- OS: Debian GNU/Linux 11 (Docker mac)
- PHP: 8.2
- Version "webklex/laravel-imap": "^6.1"
Additional context
IMAP_HOST=imap.googlemail.com
IMAP_PORT=993
IMAP_ENCRYPTION=ssl
IMAP_VALIDATE_CERT=true
IMAP_USERNAME=my@gmail.com
IMAP_PASSWORD="app pasword"
IMAP_DEFAULT_ACCOUNT=default
IMAP_PROTOCOL=imap