Microsoft KB Archive/260798

= BUG: Cannot Use CDO SendUsingExchange Method Across Domains =

Article ID: 260798

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Exchange 2000 Server Standard Edition

-



This article was previously published under Q260798



SYMPTOMS
When sending an e-mail message by way of Collaboration Data Objects (CDO) for Exchange 2000 using the SendUsingExchange enumeration between two domains, you may receive the following error:

-2147220941: Could not find the Sender's mailbox.



CAUSE
The MailboxUrl property is not set.



RESOLUTION
When sending e-mail using the SendUsingExchange enumeration, you may need to set the MailboxURL property; the following code demonstrates how to do this: Sub Main Dim oMessage As New cdo.Message SetConfig oMessage.Configuration, cdoSendUsingExchange oMessage.Subject = &quot;Test Subject via Exchange&quot; 'ToDo: Change Recipient to a valid e-mail address. oMessage.To = &quot;user@yourdomain.com&quot; oMessage.TextBody = &quot;Testing&quot; oMessage.Send Debug.Print Err.Number & &quot;: &quot; & Err.Description Set oMessage = Nothing End Sub

Function SetConfig(ByRef oConfig As cdo.Configuration, eSendUsingMethod As cdo.CdoSendUsing) Dim iCount As Integer For iCount = 1 To oConfig.Fields.Count oConfig.Fields.Delete 0 oConfig.Fields.Update Next oConfig.Fields(cdo.cdoSendUsingMethod) = eSendUsingMethod 'ToDo: Change to a valid servername. oConfig.Fields(cdo.cdoSMTPServer) = &quot;ServerName&quot; oConfig.Fields(cdo.cdoSMTPServerPort) = 25 'ToDo: Change to a valid e-mail address. This is the sender's address. oConfig.Fields(cdo.cdoSendEmailAddress) = &quot;user1@otherdomain.com&quot; 'ToDo: Change to a valid MailboxURL. This is the sender's mailbox URL. oConfig.Fields(cdo.cdoMailboxURL) = &quot;file://./BackOfficeStorage/domain/MBX/user1&quot; oConfig.Fields.Update End Function



STATUS
Microsoft has confirmed that this is a problem in Microsoft Exchange 2000 Server.



Steps to Reproduce Behavior
This error can occur when your environment is configured in the following manner. Users are created in Domain1 and Domain2. All users have an Exchange 2000 mailbox, and the Exchange Server is in Domain2. Users can access their local mailboxes, as well as send e-mail, by way of CDO for Exchange 2000 using SendUsingPort and SendUsingPickup.

Modify the code below so that cdo.cdoSendEmailAddress is an address of a user in Domain1. Run the code on the Exchange Server, and the error should be returned. Sub Main Dim oMessage As New cdo.Message SetConfig oMessage.Configuration, cdoSendUsingExchange oMessage.Subject = &quot;Test Subject via Exchange&quot; 'ToDo: Change Recipient to a valid e-mail address. oMessage.To = &quot;user@yourdomain.com&quot; oMessage.TextBody = &quot;Testing&quot; oMessage.Send Debug.Print Err.Number & &quot;: &quot; & Err.Description Set oMessage = Nothing End Sub

Function SetConfig(ByRef oConfig As cdo.Configuration, eSendUsingMethod As cdo.CdoSendUsing) Dim iCount As Integer For iCount = 1 To oConfig.Fields.Count oConfig.Fields.Delete 0 oConfig.Fields.Update Next oConfig.Fields(cdo.cdoSendUsingMethod) = eSendUsingMethod 'ToDo: Change to a valid servername. oConfig.Fields(cdo.cdoSMTPServer) = &quot;ServerName&quot; oConfig.Fields(cdo.cdoSMTPServerPort) = 25 'ToDo: Change to a valid e-mail address. This is the sender's address   oConfig. Fields(cdo.cdoSendEmailAddress) = &quot;user1@otherdomain.com&quot; oConfig.Fields.Update End Function

Additional query words: 80040233 0x80040233 ERROR_PIPE_NOT_CONNECTED

Keywords: kbbug kbmsg kbprb KB260798

-

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

© Microsoft Corporation. All rights reserved.