Hi there
im writing a program that has to read email from outlook. does anyone know how?
I managed to read all the subjects in my inbox but i'd like to read the 1st 1 in the inbox. here's the code i used to read the subjects..
Outlook.Applica tion app = new Outlook.Applica tionClass();
Outlook.NameSpa ce NS = app.GetNamespac e("MAPI");
Outlook.MAPIFol der inboxFld = NS.GetDefaultFo lder(Outlook.Ol DefaultFolders. olFolderInbox);
foreach(Outlook .MailItem t in inboxFld.Items)
{
Console.WriteLi ne(t.Subject);
}
thanks,
lil hamster
im writing a program that has to read email from outlook. does anyone know how?
I managed to read all the subjects in my inbox but i'd like to read the 1st 1 in the inbox. here's the code i used to read the subjects..
Outlook.Applica tion app = new Outlook.Applica tionClass();
Outlook.NameSpa ce NS = app.GetNamespac e("MAPI");
Outlook.MAPIFol der inboxFld = NS.GetDefaultFo lder(Outlook.Ol DefaultFolders. olFolderInbox);
foreach(Outlook .MailItem t in inboxFld.Items)
{
Console.WriteLi ne(t.Subject);
}
thanks,
lil hamster
Comment