(PHP 4, PHP 5, PHP 7, PHP 8)
imap_listscan — Returns the list of mailboxes that matches the given text
$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_stream
Um stream IMAP retornado por imap_open().
reference
reference
should normally be just the server
specification as described in imap_open()
Passing untrusted data to this parameter is insecure, unless imap.enable_insecure_rsh is disabled.
pattern
Especifica aonde na hierarquia da caixa de mensagens deve começar a procura.
Existem dois caracteres especiais que você
pode passar como parte para o pattern
:
'*
' e '%
'.
'*
' significa retornar todas as caixas de mensagens. Se você passar
pattern
como '*
', você terá
uma lista de toda a hierarquia da caixa de mensagens.
'%
'
significa retornar o nível atual apenas.
'%
' como o parâmetro pattern
ira retornar apenas as caixar de mensagem do nível superior;
'~/mail/%
' em UW_IMAPD
irá retornar cada caixa de mensagem no diretório ~/mail, mais nenhuma em subpastas deste diretório.
content
The searched string
Returns an array containing the names of the mailboxes that have
content
in the text of the mailbox, ou false
em caso de falha.