Hi Nabeel,
at the moment it's a little complicated to get only one message. What you can do, is limiting your request to retrieve only the messages which have the Recent flag set:
Best regards,
Pavel Azanov
at the moment it's a little complicated to get only one message. What you can do, is limiting your request to retrieve only the messages which have the Recent flag set:
var messages = myFolder.Search("RECENT");
another options is to use the NEW query, which will retrieve all recent messages, which are not marked as seen:var messages = myFolder.Search("NEW");
This will allow you to request a minimum of messages. After you received the messages, you can use the AddFlag method on a message to mark it as read, so it won't be included in the next request.Best regards,
Pavel Azanov