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.
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 :
Kindly help me out as i am stuck here.....
names of the user's and than setting the mail box to the user.
Code:
CDO.Message objMsg;
CDO.DropDirectory objDropDir = new CDO.DropDirectory();
CDO.IMessages objIMesgs;
DirectoryEntry de = srUser.GetDirectoryEntry(); // Where srUser = "anup"
if (de.Properties["sAMAccountName"].Value.ToString() == "anup")
{
objMailBox = (CDOEXM.Mailbox)de.NativeObject;
objPerson.DataSource.Open(de.Path,
null,
ADODB.ConnectModeEnum.adModeRead,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,
String.Empty,
String.Empty
);
objCImailBox = (CDO.IMailbox)objPerson.GetInterface("IMailbox");
MessageBox.Show(objCImailBox.RootFolder);
}
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 :
Code:
objIMesgs = objDropDir.GetMessages(objFolderClass.SourceURL);
foreach(msg in objMesgs)
{
msg.SubjectName;
}
Kindly help me out as i am stuck here.....
Comment