Microsoft KB Archive/841815

= 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 =

Article ID: 841815

Article Last Modified on 10/25/2007

-

APPLIES TO


 * Microsoft Exchange Server 2003 Enterprise Edition
 * Microsoft Exchange Server 2003 Standard Edition
 * Microsoft Exchange 2000 Server Standard Edition
 * Microsoft Exchange 2000 Enterprise Server

-





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:

Line:

Char:

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.



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(&quot;CDO.Person&quot;) strURL = &quot;mailto:user1@corp.contoso.com&quot; person.DataSource.Open strURL set Mailbox = person.GetInterface(&quot;IMailbox&quot;) This problem occurs even if you run this script on the computer that is running Exchange Server.



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(&quot;CDO.Person&quot;) strURL = &quot;LDAP://corp.contoso.com/CN=user1,CN=Users,DC=corp,DC=contoso,DC=com&quot; person.DataSource.Open strURL set Mailbox = person.GetInterface(&quot;IMailbox&quot;)



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

http://msdn2.microsoft.com/en-us/library/aa487579.aspx

Additional query words: XADM

Keywords: kbprb KB841815

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.