Microsoft KB Archive/840835

= &quot;Error (0x8004011D) The server is not available&quot; error message if you use CDO to programmatically create and send a message when you log on by using a profile that uses the Outlook 2002 Connector =

Article ID: 840835

Article Last Modified on 6/8/2005

-

APPLIES TO


 * Microsoft Office Outlook Connector

-





SYMPTOMS
When you start Microsoft Outlook 2002 by using a profile that uses the Microsoft Outlook 2002 Connector to log on to an IBM Lotus Domino Release 5 server, and you use Collaboration Data Objects (CDO) to programmatically create and send a message, you may find that the message is not sent to the recipient. The message remains in the Outbox folder in Outlook 2002. If you open the message in the Outbox folder, the Send button of the message is still available. If you click Send to send the message, you receive the following error message in the Send/Receive dialog box:

Task: &quot;Microsoft Outlook 2002 Connector (for Lotus Domino server) - Sending and Receiving&quot; reported error (0x8004011D) &quot;The server is not available. Contact your administrator if this condition persists.&quot;

You do not experience these symptoms if you start Outlook by using a profile that logs on to Microsoft Exchange Server, and if you use CDO to programmatically create and send a message.



CAUSE
This problem occurs because the Outlook 2002 Connector assumes that the value of the PR_MESSAGE_CLASS property of the message is case-sensitive and is set to &quot;IPM.Note&quot; (with the quotation marks). By default, when you create a message by using CDO, the PR_MESSAGE_CLASS property of the message is set to “IPM.NOTE” (with the quotation marks) and is not set to &quot;IPM.Note” (with the quotation marks). If the Outlook 2002 Connector incorrectly processes the value of the PR_MESSAGE_CLASS property of the message, the message type cannot be determined, and you experience the symptoms that are mentioned in the &quot;Symptoms&quot; section.

For example, this issue occurs if you use the following sample code to programmatically send mail to the current user who is logged on to a Lotus Domino release 5 server by using Outlook 2002 Connector:

Set oSession = CreateObject(&quot;MAPI.Session&quot;) oSession.Logon, , True, True Set oOutbox = oSession.Outbox Set oMessage = oOutbox.Messages.Add oMessage.Subject = &quot;CDO New Test at: &quot; & Now oMessage.Text = &quot;This is a test&quot; Set objRecipient = oMessage.Recipients.Add objRecipient.Name = oSession.CurrentUser Msgbox oSession.CurrentUser objRecipient.Resolve oMessage.Send Set objRecipient = Nothing set oMessage = Nothing Set oOutbox = Nothing oSession.Logoff set oSession= nothing Msgbox &quot;Done&quot;



WORKAROUND
To work around this problem, when you send a message by using CDO and MAPI, set the PR_MESSAGE_CLASS property of the message to &quot;IPM.Note&quot; (with the quotation marks). In the example that is mentioned in the &quot;Cause&quot; section, insert the following line before the &quot;oMessage.Send&quot; line:

oMessage.Fields(&H001A001E).Value = &quot;IPM.Note&quot;



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For more information about Outlook 2002 Connector for IBM Lotus Domino, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=60C4D659-3249-46CC-9CB9-DB128B38E399&amp;displaylang=en

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Keywords: kbbug kbnofix KB840835

-

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

© Microsoft Corporation. All rights reserved.