473,625 Members | 3,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Iterating folder of each mailbox in exchange store using CDO library

4 New Member
I am able to access the exchange mail boxes of the mounted edb file using Active Directory Services such that i am retrieving the

names of the user's and than setting the mail box to the user.
Expand|Select|Wrap|Line Numbers
  1.  CDO.Message objMsg;
  2.  CDO.DropDirectory objDropDir = new CDO.DropDirectory();
  3.  CDO.IMessages objIMesgs;
  4.  
  5.  
  6.  DirectoryEntry de = srUser.GetDirectoryEntry();            // Where srUser = "anup"
  7.  
  8.  
  9.  if (de.Properties["sAMAccountName"].Value.ToString() == "anup")
  10.  {
  11.  
  12.                                     objMailBox = (CDOEXM.Mailbox)de.NativeObject;                              
  13.  
  14.                            objPerson.DataSource.Open(de.Path,
  15.                                  null,
  16.                               ADODB.ConnectModeEnum.adModeRead,
  17.                              ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
  18.                               ADODB.RecordOpenOptionsEnum.adOpenSource,
  19.                              String.Empty,
  20.                             String.Empty
  21.                                                 );
  22.  
  23.                                     objCImailBox = (CDO.IMailbox)objPerson.GetInterface("IMailbox");
  24.  
  25.                                     MessageBox.Show(objCImailBox.RootFolder);
  26.  
  27. }
  28.  
The problem is like :

1) After setting the objCmailBox to objPerson i am unable to get the URL's for Inbox, Sent Items.... and other's except for the

RootFolder URL.

I am able to get the url only for the RootFolder ie (file://./backofficestora ge/pcvita.com/MBX/anup/IPM_ROOT)

2) I need to iterate through each of the folder like inbox and sent items and their mails through IMessages and IMessage.

such that :
Expand|Select|Wrap|Line Numbers
  1.                         objIMesgs = objDropDir.GetMessages(objFolderClass.SourceURL);
  2.  
  3.                          foreach(msg in objMesgs)
  4.                           {
  5.                                     msg.SubjectName;
  6.                            }
  7.  


Kindly help me out as i am stuck here.....
Jul 17 '09 #1
2 3330
anup wadekar
4 New Member
Hi,

Here is my code :

objCImailBox = (CDO.IMailbox)o bjPerson.GetInt erface("IMailbo x");

MessageBox.Show (objCImailBox.R ootFolder);

The problem is like :

1) After setting the objCmailBox to objPerson i am unable to get the URL's for Inbox, Sent Items.... and other's except for the RootFolder URL.

I am able to get the url only for the RootFolder ie (file://./backofficestora ge/pcvita.com/MBX/anup/IPM_ROOT)

I am looking for help which will allow me to access each of the folder and Items using the file :// URL

But i am not getting the URL path of each folder of the mail box as the objCImailBox.In box returns empty string instead

of file://path of the inbox.

I am able to get the path of the root folder. But i am unable to get the other URL path's for the ofher folder ie

(Inbox...).

Kindly provide me some few steps of code which i can fetch the folder URL's and than access each of the folder using

CDO.IFolder interface and open the items.

Your help will really help me out from this problem.
Jul 17 '09 #2
pratikmehta9
3 New Member
I am facing the same issue.. did you find the solution?
Mar 23 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1495
by: Viorel | last post by:
How to gett a message from Exchange Server using WebDAV?
0
823
by: Michael Bray | last post by:
I'm considering writing an application for my company that looks at employees schedules and performs some scheduling operations that Outlook doesn't support natively (such as finding an available person for a consulting job with a particular set of skills). Does anyone know of any .NET example code (C# preferably) that accesses the Exchange Store? FYI I'm aware of the following already:
0
1093
by: Anders K. Olsen | last post by:
Hello group Happy New Year to you all. I'm developing a Windows Service that needs to access the messages stored in a Public Folder in Microsoft Exchange. I have been looking into CDO 1.21, and so far i have been able to create a windows application that lists the messages, but when I try to get sender information of a message, a popup window appears with the message "A program
0
1337
by: =?Utf-8?B?UGFkYW0=?= | last post by:
How to get different tooltip for each listitem in dropdownlist using C#. I am binding dropdownlist using database. Ofcourse each item in dropdownlist will be different. kindly do help me.
2
4269
by: =?Utf-8?B?RGF2aWRF?= | last post by:
Hi, I try to connect to Exchange server using MAPI. I need to access a special user inbox and read all his new mails. The code I wrote work good, but I get my inbox instead of the user I need. Here the code : MAPI.Session objSession; MAPI.Folder objFolder ;
1
1891
by: edcba | last post by:
Hello, I am required to write a C# app to connect to an exchange server using .Net 3.5. The aim will be then to receive emails and insert the email text into a database table. My first question would be how big a job would this be? Any advice on how to go about this task? many thanks
0
1099
by: santhosh309 | last post by:
Hi, How to retrive emails,attachments from exchange server using C#.NET?
1
2273
by: santhosh309 | last post by:
How to download emails from exchange server using C#.net?
0
1093
by: kottiPrasad | last post by:
Hello , I have mailboxes in the exchange server and i need to copy the mailboxes data from the exchange server and place it to the other exchange server using c#.Is it possible to access the exchange server using c#.Please anyone guide me regarding this. It will be very much helpful if anyone help me in this regards. Thank you in Advance.
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6119
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.