By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,896 Members | 1,983 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,896 IT Pros & Developers. It's quick & easy.

Outlook Program

P: n/a
I need to access a user's inbox and extract attachments off of new messages.
I have connected up to my Inbox and can see my messages, but I need to
navigate to another user's inbox. Any help would be appreciated. Here's some
of the code I'm using:

// Get items in my inbox.
Application outLookApp = new Application();
NameSpace outlookNS = outLookApp.GetNamespace("MAPI");
MAPIFolder inboxFolder =
outlookNS.GetDefaultFolder(OlDefaultFolders.olFold erInbox);

// Print out basic info.
Console.WriteLine("You have {0} e-mails.", inboxFolder.Items.Count);
foreach (object obj in inboxFolder.Items)
MailItem item = obj as MailItem;
if (item != null)
Console.WriteLine("-Received: {0}", item.ReceivedTime.ToString());
Console.WriteLine("-Sender: {0}", item.SenderName);
Console.WriteLine("NBR ATTACHMENTS: {0}", item.Attachments.Count);
Oct 2 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.