This method supports unique IDs instead of message numbers. See
{@link ezcMailImapTransportOptions} for how to enable unique IDs
referencing.
If $deleteFromServer is set to true the mail will be marked for deletion
after retrieval. If not it will be left intact.
Note: for IMAP the first message is 1 (so for $number = 0 an exception
will be thrown).
Before calling this method, a connection to the IMAP server must be
established and a user must be authenticated successfully, and a mailbox
must be selected.
Example:
$imap = new ezcMailImapTransport( 'imap.example.com' );
$imap->authenticate( 'username', 'password' );
$imap->selectMailbox( 'Inbox' );
$set = $imap->fetchByMessageNr( 1 );
$set can be parsed with ezcMailParser
public fetchByMessageNr ( integer $number, boolean $deleteFromServer = false ) : ezcMailImapSet | ||
$number | integer | |
$deleteFromServer | boolean | |
return | ezcMailImapSet |