PHP 8.3.4 Released!

imap_getsubscribed

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

imap_getsubscribedList all the subscribed mailboxes

Descrição

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

Gets information about the subscribed mailboxes.

Identical to imap_getmailboxes(), except that it only returns mailboxes that the user is subscribed to.

Parâmetros

imap

Uma instância de IMAP\Connection.

reference

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

Aviso

Passar dados não confiáveis para este parâmetro é inseguro, a menos que imap.enable_insecure_rsh esteja desabilitado.

pattern

Especifica onde iniciar a pesquisa na hierarquia da caixa de mensagem.

Existem dois caracteres especiais que podem ser passados como parte do parâmetro pattern: '*' e '%'. '*' significa retornar todas as caixas de mensagem. Se pattern for passado como '*', será retornada uma lista de toda a hierarquia da caixa de mensagem. '%' significa retornar apenas o nível atual. Passar '%' como o parâmetro pattern retornará apenas as caixas de mensagem do nível mais alto; Passar '~/mail/%' em UW_IMAPD retornará todas as caixas de mensagem no diretório ~/mail, mas não retornará nenhuma nas subpastas deste diretório.

Valor Retornado

Returns an array of objects containing mailbox information. Each object has the attributes name, specifying the full name of the mailbox; delimiter, which is the hierarchy delimiter for the part of the hierarchy this mailbox is in; and attributes. Attributes is a bitmask that can be tested against:

The function returns false on failure.

Registro de Alterações

Versão Descrição
8.1.0 O parâmetro imap agora espera uma instância de IMAP\Connection; anteriormente, um resource imap válido era esperado.
add a note

User Contributed Notes

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