Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
srinivasa reddy...
(25)
Babu Akkandi
(16)
Shashi
(16)
Last 7 Days
Appukuttan
(620)
Babu Akkandi
(453)
Tejinder Singh ...
(275)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
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
(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
!
Related Resources
Send Email using ASP.NET 2.0 and C#
How to send a Mail through ASP.NET
Send email with embedded images
HTML E-mail with images
Sending Inline Attachments Thru E-Mail
dotNet Slackers
BizTalk Adaptors
Web Design
Contact Us
Privacy Policy
Terms Of Use