BUG: Cannot Use CDO SendUsingExchange Method Across Domains (260798)
The information in this article applies to:
- Microsoft Exchange 2000 Server
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 = "Test Subject via Exchange"
'ToDo: Change Recipient to a valid e-mail address.
oMessage.To = "user@yourdomain.com"
oMessage.TextBody = "Testing"
oMessage.Send
Debug.Print Err.Number & ": " & 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) = "ServerName"
oConfig.Fields(cdo.cdoSMTPServerPort) = 25
'ToDo: Change to a valid e-mail address. This is the sender's address.
oConfig.Fields(cdo.cdoSendEmailAddress) = "user1@otherdomain.com"
'ToDo: Change to a valid MailboxURL. This is the sender's mailbox URL.
oConfig.Fields(cdo.cdoMailboxURL) = "file://./BackOfficeStorage/domain/MBX/user1"
oConfig.Fields.Update
End Function
STATUSMicrosoft has confirmed that this is a problem in Microsoft Exchange 2000 Server.
Modification Type: | Minor | Last Reviewed: | 3/4/2004 |
---|
Keywords: | kbbug kbMsg kbprb KB260798 |
---|
|