Beispiel #1
0
 /// <summary>
 /// Gets the previous mail item
 /// </summary>
 /// <returns>previous mail item</returns>
 public MailItem GetPrevious()
 {
     return(new MailItem(_mailItems.GetPrevious()));
 }
Beispiel #2
0
        private Outlook.MailItem FindMail(string mailIndex, Outlook.MAPIFolder folder)
        {
            Outlook.Items items = folder.Items;
            int           count = 0;

            for (Outlook.MailItem mailItem = items.GetLast(); count++ < 10 && mailItem != null; mailItem = items.GetPrevious())
            {
                if (mailItem.ConversationIndex.Equals(mailIndex))
                {
                    return(mailItem);
                }
            }
            return(null);
        }