Dutch PHP Conference 2025 - Call For Papers

imap_listscan

(PHP 4, PHP 5, PHP 7, PHP 8)

imap_listscanReturns the list of mailboxes that matches the given text

Опис

imap_listscan(
    IMAP\Connection $imap,
    string $reference,
    string $pattern,
    string $content
): array|false

Returns an array containing the names of the mailboxes that have content in the text of the mailbox.

This function is similar to imap_listmailbox(), but it will additionally check for the presence of the string content inside the mailbox data.

Параметри

imap

Примірник IMAP\Connection.

reference

reference should normally be just the server specification as described in imap_open()

Увага

Передавати у цей параметр неперевірені дані небезпечно, якщо увімкнено imap.enable_insecure_rsh.

pattern

Визначає, де в ієрархії поштових скриньок почати пошук.

У значенні параметру pattern можна використовувати два спеціальні символи: "*" і "%". "*" — повернути всі поштові скриньки. Якщо значення pattern дорівнюватиме "*", то повернеться список усієї ієрархії поштових скриньок. "%" — повернути тільки поточний рівень. Якщо значення pattern дорівнюватиме "%", то повернеться тільки верхній рівень поштових скриньок; "~/mail/%" на UW_IMAPD поверне усі поштові скриньки в теці ~/mail, крім тих, що в її підтеках.

content

The searched string

Значення, що повертаються

Returns an array containing the names of the mailboxes that have content in the text of the mailbox, або false в разі помилки.

Журнал змін

Версія Опис
8.1.0 Тепер параметр imap має бути примірником IMAP\Connection; раніше очікувався дійсний resource imap.

Прогляньте також

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top