Skip to content

Throwing error in pop3 connection if mailbox empty folder #506

@purnada

Description

@purnada

Describe the bug
this is my connection
`$client = $this->clientManager->make([
'host' => $imap->host,
'port' => 995,
'encryption' => $imap->encryption,
'validate_cert' => true,
'username' => $imap->username,
'password' => decrypt($imap->password),
'protocol' => 'pop3',
'timeout' => 30 // Add explicit timeout
]);

    $client->connect();

   $folder = $client->getFolder('INBOX');

        // Check message count before fetching
        $messageCount = $folder->query()->count();

        if ($messageCount === 0) {

            $client->disconnect();
            return collect([]);

        }

`
i want if the message is empty i want to disconnect the connection and return empty array but it is not returning empty array it is returning PHP Request Shutdown: Mailbox is empty (errflg=1)

Desktop / Server (please complete the following information):

  • OS: [windows]
  • PHP: [8.3.9]
  • Version [6.1]

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