note 127022 added to function.imap-msgno

From: Date: Sun, 01 May 2022 08:37:53 +0000
Subject: note 127022 added to function.imap-msgno
Groups: php.notes 
Request: Send a blank email to php-notes+get-218332@lists.php.net to get a copy of this message
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!"); ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 89.144.199.242) ---- Manual Page -- https://php.net/manual/en/function.imap-msgno.php Edit -- https://main.php.net/note/edit/127022 Del: integrated -- https://main.php.net/note/delete/127022/integrated Del: useless -- https://main.php.net/note/delete/127022/useless Del: bad code -- https://main.php.net/note/delete/127022/bad+code Del: spam -- https://main.php.net/note/delete/127022/spam Del: non-english -- https://main.php.net/note/delete/127022/non-english Del: in docs -- https://main.php.net/note/delete/127022/in+docs Del: other reasons-- https://main.php.net/note/delete/127022 Reject -- https://main.php.net/note/reject/127022 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#218332) next »