Last post Dec 31, 2007 01:11 PM by EYedwabHome
Apr 17, 2007 02:56 AM|pjyadav100|LINK
Hi guys i this is jitender, i m having the solution of reading mails from outlook 2003,hope it will help to needy person,
you have to use Outlook Object Model for that.
add in the reference,
microsoft Outlook 11.0 object library.
than u have to referenced outlook redemption this dll will help us to hide security message.
FilePath = ConfigurationSettings.AppSettings(
PollMail = ConfigurationSettings.AppSettings(
oApplication = CreateObject(
oNameSpace = oApplication.GetNamespace(
oSafeItem = CreateObject(
inbox = oNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
SavedMailsAttachment = inbox.Parent
oTempFolder = oNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
oFolders = oTempFolder.Folders
SavedMailsAttachment = oFolders.Add(PollMail, Outlook.OlDefaultFolders.olFolderInbox)
oInbox = inbox.Folders
SubFolder = inbox.Folders(
count = inbox.Items.Count
objMail = oApplication.CreateItem(Outlook.OlItemType.olMailItem)
objMail = inbox.Items(i + 1)
obj = attachObject.MAPIOBJECT
AttachmentFile = FilePath & attachObject.FileName
FileName = attachObject.FileName.ToString()
OFileName = ExtFileNameFrmExt(FileName)
TextFilePath = FilePath & OFileName &
oSafeItem.Item = objMail
sBody = oSafeItem.Body
i = i - 1
One more thing i need to told you,we can't do this in C#.
Dec 04, 2007 08:37 AM|madhan_singh|LINK
I have created a web application in c# and executed it. in the debug mode that is when i am executing the application in my machine i am able to read the mails, but when i created virtual directory and accessing it from my own computer/system using the
IP instead of locahost its asking for credentials, even if i give my own windows autentication credentials it says not authorized to view the page. I am unable to access it from other systems too..
Will your code can be used to access the outlook mails if we create the virtual directory and access. If so pls let me know.
Dec 31, 2007 01:11 PM|EYedwabHome|LINK
When I try to add a reference in VS 2005, I cannot find that library in either .net or com objects. anyone have any ideas of where I can get this or find it?