Example: mapi_read_next_mail

In the following example, the mapi_read_next_mail peeks at a sticky note message.

// Reset mail to beginning of mailbox

    mapi_set_property_sz("Message ID", "");

    do {
        // Peek at next mail (don't mark it as read)
        rc = mapi_read_next_mail("NextMail",
        "Show=all", 
       "Peek=True",     
       "Type=IPM.Note",
       LAST );
   } while (rc == LR_PASS);