PHP 8.4.2 Released!

imap_subscribe

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

imap_subscribeSubscribe to a mailbox

Descripción

imap_subscribe(IMAP\Connection $imap, string $mailbox): bool

Subscribe to a new mailbox.

Parámetros

imap

An IMAP\Connection instance.

mailbox

The mailbox name, see imap_open() for more information

Advertencia

El paso de datos no confiables a este parámetro es inseguro, a menos que imap.enable_insecure_rsh esté inhabilitado.

Valores devueltos

Devuelve true en caso de éxito o false en caso de error.

Historial de cambios

Versión Descripción
8.1.0 The imap parameter expects an IMAP\Connection instance now; previously, a valid imap recurso was expected.

Ver también

add a note

User Contributed Notes 1 note

up
1
shacky
15 years ago
Hi,
When $mailbox string ends with '/' it doesn't subscribe and doesn't return any error. You need to rtrim this character.
To Top