(PHP 4, PHP 5, PHP 7, PHP 8)
imap_msgno — Devuelve el número de secuencia del mensaje para un UID dado
Devuelve el número de secuencia del mensaje para el UID message_uid.
Esta función es el inverso de la función imap_uid() .
Devuelve el número de secuencia del mensaje para el UID message_uid.
| Versión | Descripción |
|---|---|
| 8.1.0 |
El parámetro imap ahora espera una instancia de IMAP\Connection
; anteriormente, se esperaba un resource imap válido.
|
Here is a simple working snippet to properly check the return value of imap_msgno():
$id = imap_msgno($imapConnection, $mailUid); //convert to normal messagenumber in current context
$verifyUid = imap_uid($imapConnection, $id);
if ($verifyUid != $mailUid)
throw new Exception("Attention: imap_msgno returned nonsense! The mail was probably not found in the mailbox!");