If you need to use the uid instead of msgno use
imap_clearflag_full($stream, implode(',', $flags), '\\DELETED', ST_UID);
(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
を返します。
If you need to use the uid instead of msgno use
imap_clearflag_full($stream, implode(',', $flags), '\\DELETED', ST_UID);
The imap_delete function allows the option to use a UID for the message number but the imap_undelete function does not.