Discussion:
CDO.IMailbox properties
(too old to reply)
steph-cpwr
2007-10-08 06:54:01 UTC
Permalink
Hi,

On one of the exchange servers the iMailBox object seems not to be populated
properly. Except the .RootFolder property none of the other properties is
populated.
What I do is something like:
--
Dim oPerson As CDO.Person
Dim oInfo As New ADSystemInfo
Dim oMailbox As IMailbox
Dim oResAddr As CDO.Addressee

Set oPerson = New CDO.Person
Set oResAddr = New CDO.Addressee
oResAddr.EmailAddress = Trim(email.Text)

If oResAddr.CheckName("LDAP://" & oInfo.DomainDNSName) Then
oPerson.DataSource.Open oResAddr.DirURL

Set oMailbox = oPerson.GetInterface("IMailbox")
end if
--

Now the properties are looking like:

======= ADSystemInfo object =======

oInfo.ComputerName: CN=MAIL-IM,CN=Computers,DC=pezza,DC=com
oInfo.DomainDNSName: pezza.com
oInfo.DomainShortName: PEZZA
oInfo.ForestDNSName: pezza.com
oInfo.IsNativeMode: True
oInfo.PDCRoleOwner: CN=NTDS
Settings,CN=TEST-W2K,CN=Servers,CN=Default-irst-Site-Name,CN=Sites,CN=Configuration,DC=pezza,DC=com
oInfo.SchemaRoleOwner: CN=NTDS
Settings,CN=TEST-2K,CN=Servers,CN=Default-First-Site-ame,CN=Sites,CN=Configuration,DC=pezza,DC=com
oInfo.SiteName: Default-First-Site-Name
oInfo.UserName: CN=Administrator,CN=Users,DC=pezza,DC=com
===== CDO.Person ======
oPerson.email: ***@pezza.com
oMailbox.BaseFolder:
oMailbox.Calendar:
oMailbox.Contacts:
oMailbox.DeletedItems:
oMailbox.Drafts:
oMailbox.Inbox:
oMailbox.Journal:
oMailbox.Notes:
oMailbox.Outbox:
oMailbox.RootFolder:
file://./backofficestorage/pezza.com/MBX/test1/NON_IPM_SUBTREE
oMailbox.SentItems:
oMailbox.Tasks:


Has anyone an idea why the properties are empty? On other exchange servers
it is working fine.

Best Regards
Stephan
steph-cpwr
2007-10-08 09:45:01 UTC
Permalink
It turns out that the user executing the program has no access to the
specified mailbox. Giving the user access to the specified mailbox will
populate the properties.

Loading...