barbushin / php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)
MIT License
1.65k stars 459 forks source link

fetch_overview does not allow select range with * #708

Open michalcharvat opened 1 year ago

michalcharvat commented 1 year ago

The used code:

$imapPath = '{' . $imap_host . ':' . $imap_port . '/imap/' . $imap_encryption . '}' . $mailbox;

$mailboxConnection = new Mailbox(
    $imapPath,
    $this->imap_username,
    $this->imap_password,
    null, // Directory, where attachments will be saved (optional)
    'UTF-8', // Server encoding (optional),
     true,
     true,
);

$mails = Imap::fetch_overview(
    $mailboxConnection->getImapStream(),
    '1:*',
    FT_UID
);
swim89 commented 1 year ago

This solved my issue.