Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

A CDOEX program returns error code 80005008 when it tries to access a mailbox on a computer that is running Exchange Server 2003 or Exchange 2000 Server


View products that this article applies to.

Symptoms

When you try to access a user's mailbox by using the IMailBox interface in Collaboration Data Objects for Exchange 2000 Server (CDOEX), you receive an error message that is similar to the following:
Script: ScriptName
Line: LineNumber
Char: CharacterNumber
Error: Unknown Error
Code: 80005008
Source: (null)
In this scenario, you cannot access certain mailboxes by using CDOEX. However, you can access other mailboxes successfully.

↑ Back to the top


Cause

This problem occurs when all the following conditions are true:
  • The user account whose mailbox that you try to access is located in one particular Active Directory directory service domain.
  • The mailbox for that user account is hosted on a Microsoft Exchange Server computer that is located in a different trusted Active Directory domain.
  • You try to access the user's mailbox by specifying the SMTP address in a CDOEX script.
For example, this problem occurs if you create a script that is similar to the following to access the user's mailbox:
Set person = createobject("CDO.Person")
strURL = "mailto:user1@corp.contoso.com"
person.DataSource.Open strURL
set Mailbox = person.GetInterface("IMailbox")
This problem occurs even if you run this script on the computer that is running Exchange Server.

↑ Back to the top


Workaround

To work around this issue, do not try to access the user account mailbox by using the SMTP address. Instead, specify the distinguished name (also known as DN) of the user account in your CDOEX script when you want to locate a user who is in a separate domain. For example, create a script that is similar to the following to access the user's mailbox.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Set person = createobject("CDO.Person")
strURL = "LDAP://corp.contoso.com/CN=user1,CN=Users,DC=corp,DC=contoso,DC=com"
person.DataSource.Open strURL
set Mailbox = person.GetInterface("IMailbox")

↑ Back to the top


More information

For additional information about the IMailBox interface, visit the following Microsoft Web site:

↑ Back to the top


Keywords: KB841815, kbprb

↑ Back to the top

Article Info
Article ID : 841815
Revision : 7
Created on : 10/25/2007
Published on : 10/25/2007
Exists online : False
Views : 346