Hi all,
Thanks for your reply Henry, Where do i find the type of the PROPERTY
i.e whether it was string or bool or ULONG.
char tempValue[] = "/o=.../ou=.../cn=...";
SPropValue spv;
spv.ulPropTag = PR_EMS_AB_HOME_MTA;
//spv.Value.b = TRUE;
spv.Value.lpszA = (LPTSTR)tempValue;
Even the above code fails in a way that no users were returned, the
output value (no of rows returned) is Zero. Without applying
restriction based on PR_EMS_AB_HOME_MTA, I was able to get all the
users in that Exchange Server.
Any suggestions..
Thanks
deenad
Post by Henry GusakovskyPR_EMS_AB_HOME_MTA is a string property and not BOOL
so
SPropValue spv;
spv.ulPropTag = PR_EMS_AB_HOME_MTA;
spv.Value.b = TRUE;
this code is wrong.
Regards
Henry
Post by deenaHi dummy,
Thanks for pointing out my ignorance between users and mailboxes.
After following the steps(Opening GAL...), the restrict method of
LPMAPITABLE fails with the error E_INVALIDARG.>From this I believe that one of the argument of the restrict method
was wrong.
Here is the code
SPropValue spv;
spv.ulPropTag = PR_EMS_AB_HOME_MTA;
spv.Value.b = TRUE;
SRestriction sres;
sres.rt = RES_PROPERTY;
sres.res.resProperty.relop = RELOP_EQ;
sres.res.resProperty.ulPropTag = PR_EMS_AB_HOME_MTA;
sres.res.resProperty.lpProp = &spv;
Can you please direct me where i am going wrong??
Thanks
deenad
Post by dummyAlso PLEASE, note that there are differences between USERS and MAILBOXES...
Users can > that MAILBOXES
Post by deenaHi dummy,
Thanks for your reply. I would like to know a way how to list all
mailboxes(users) eventhough some of the the users were not logged in
or no mail was sent to them. I referenced Q194627 article(MSDN
Library) in my previous post as I thought that this article would be
able to resolve the issue but not..
Hope someone would come up with the solution.
Thanks in advance
deenad
Post by dummyIt is normal - code from Q194627, specially GetMailboxTable, return
MAILBOXES that EXISTS.. If some mail user (exchange account) never was
logged into Exchange, or was never recieved mail - mailbox is not created
and not listed... Check this: send a small e-mail - with 2 words to all
exchange recipients... wait 5 or 10 min (exchange server need time to
deliver mesage to all recipient) then run your application... you will see
all EXISTING mailboxes..
Post by deenaHi all,
I was able to list some of the names of the mailboxes in Exchange
Server but could not list all the mail boxes in that Server. From the
previous posts in Exchange Group discussion, they directed to refer
the article Q194627 in MSDB Library, That article does not help in
listing all the users. But if I was logging into a user, that user was
additonally listed when next time I am executing the exe.
Any suggestions on this regard will be greatly appreciated.
Thanks in advance.
deenad