Skip to content

idle does not return data when new mail arrives #597

@nguyenthang327

Description

@nguyenthang327

my command

<?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";

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * 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);
    }
}

libary: "webklex/laravel-imap": "^6.2"

I can't receive new messages when new emails arrive
response error is always "empty response" in nextLine function in ImapProtocol.php file
Please help me, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions