$imapConnection = loginToImapServer($username, $key, $imapServerAddress);
selectMailbox($imapConnection, $mailbox, $numMessages);
// $message contains all information about the message
// including header and body
$imapConnection = loginToImapServer($username, $key, $imapServerAddress);
selectMailbox($imapConnection, $mailbox, $numMessages);
// $message contains all information about the message
// including header and body