php8.5
Home/ Manual/ imap / functions/ imap_listscan

imap_listscan

PHP function Edit on GitHub ✎

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

Returns the list of mailboxes that matches the given text

Description

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.

Parameters

reference

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

Insecure

pattern

Pattern

content

The searched string

Return Values

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

Changelog

VersionDescription

See Also

Source: reference/imap/functions/imap-listscan.xml · from the official PHP manual (php/doc-en)