The imap_delete function allows the option to use a UID for the message number but the imap_undelete function does not.
(PHP 4, PHP 5, PHP 7, PHP 8)
imap_undelete — Снимает с сообщения метку удаления
$imap
, string $message_num
, int $flags
= 0): boolУдаляет с заданного сообщения метку удаления, которая была установлена с помощью imap_delete() или imap_mail_move().
Возвращает true
в случае успешного завершения или false
в случае возникновения ошибки.
The imap_delete function allows the option to use a UID for the message number but the imap_undelete function does not.