Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Alwyn
(42)
Nadheera V
(40)
Abhisek Panda
(40)
Last 7 Days
Alwyn
(706)
nishithraj
(512)
Gaurav Arora
(504)
more...
Resources
»
Code Snippets
»
Email
»
Reading mails from microsoftOutlook
Posted Date: 20 May 2008
Resource Type:
Code Snippets
Category:
Email
Author:
vijetha
Member Level:
Gold
Rating:
Points
: 10
add a reference
right click on project, click com tab
add microsoft outlook 10.0 object library
Outlook.Application objoutlook = new Outlook.Application();
Outlook.MailItem objItem;
Outlook.MAPIFolder objMapifolder;
Outlook.NameSpace objnamespace = objoutlook.GetNamespace("MAPI");
objMapifolder = objnamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.Items objitems = objMapifolder.Items.Restrict("[Unread] = true");
intI = objMapifolder.Items.Restrict("[Unread] = true").Count;
for (int i = 1; i <= intI; i++)
{
objItem = (MailItem)objMapifolder.Items.Restrict("[Unread] = true").Item(1);
objItem.UnRead = false;
for (int a = 1; a <= objItem.Attachments.Count; a++)
{
string str1=objItem.Attachments.Item(a).FileName;
}
}
Responses
Author:
Kapil Dhawan
17 Jun 2008
Member Level:
Gold
Points
: 2
Hello
Nice piece of code
Thanks for sharing your knowledge with us.
I hope to see more good code from your side
This code is going to help lots of guys.
Ton Thanks to you
Regards,
Kapil
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
E-mail validation using regular expression
Previous Resource:
How to send E-mail from .NET applications
Return to Discussion Resource Index
Post New Resource
Category:
Email
Post resources and
earn money
!
More Resources
E-mail validation using regular expression
Mail using ASP.NET , c#
Sending email using Gmail SMTP
Send Emails with Gmail Account with Attachment
Send a mail in asp.net with c# 2.0
How to send a Mail through ASP.NET
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use