I am quite new to VSTO and C# programming and am self-learning. I created an Outlook addin that does several things. One of the features is that it takes all sent items and adds them to our DB. When the user sends an email from Outlook it works as expected and prompts/adds it perfectly. But when they sent an email from their phone it only prompt them for the last email sent. I expected that once they open Outlook and it downloads the latest Sent items, it would prompt them for each item to save to the DB. But it is only prompting the last downloaded item, not each one as they download. I think some sort of queue would be reqiured but I can't find any examples. Any help would be greatly appreciated.
here is my code.
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Outlook.Application application = this.Application;
_items = Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail).Items;
_items.ItemAdd += new Outlook.ItemsEvents_ItemAddEventHandler(SentFolderItemAdded);
}
private void SentFolderItemAdded(object item)
{
// Code to prompt the user and add it to the DB
}