How to view outlook mail from the grid
how to create application to read outlook mail from the gridi need only to read/view Message not to send .
Using Microsoft.Office.Interop.Outlook;
public anyevent()
{
Outlook.Application objApplication = new Outlook.Application();
Outlook.MAPIFolder objInboxEmail = objApplication.ActiveExplorer().Session.GetDefaultFolder(
Outlook.OlDefaultFolders.olFolderInbox);
for () // Using Loop grab all the mails
{
objSubjectList.Add(((Outlook.MailItem)objInboxEmail.Items[i]).Subject);
}
listBox1.DataSource = objSubjectList; // Now you will get the list of all the mails with all the details
}
//Same event of any sub event
// populate list
DataTable ListAsDataTable = BuildDataTable<int>(objSubjectList); // Which you got in last function
DataView ListAsDataView = ListAsDataTable.DefaultView;