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.

CDOEX cdoSaveSentItems configuration constant is ignored on Exchange Server 2003 and on Exchange 2000 Server


View products that this article applies to.

This article was previously published under Q321513

↑ Back to the top


Symptoms

When you set the value of the http://schemas.microsoft.com/cdo/configuration/savesentitems configuration value or its equivalent named constant, cdoSaveSentItems, to False in Collaboration Data Objects for Exchange 2000 (CDOEX), the configuration is ignored on Microsoft Exchange Server 2003 and on Microsoft Exchange 2000 Server. You expect that if you set this value to False, a user can send an e-mail message through code and not save the e-mail message to the Sent Items folder.

↑ Back to the top


Cause

The e-mail message is always saved to the Sent Items folder. The Microsoft Developer Network (MSDN) documentation incorrectly states that you can determine whether an e-mail message is saved to the Sent Items folder when you set this field to False.

↑ Back to the top


Status

This behavior is by design. The MSDN documentation will be updated in a future release.

↑ Back to the top


More information

Steps to reproduce the behavior

Note The following code must run on a computer that is running Exchange Server 2003 or Exchange 2000 Server.
  1. Start Microsoft Visual Basic 6.0. Then, create a new Standard EXE project.
  2. Add a reference to the Microsoft CDO for Exchange 2000 Library.
  3. Add a CommandButton control to the form.
  4. Double-click the button, and then replace the default code with the following code.
    Private Sub Command1_Click()
        Dim oMsg As CDO.Message 
        Set oMsg = New CDO.Message 
        'Exchange 
        oMsg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 3 
        oMsg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/savesentitems") = False 
        oMsg.Configuration.Fields.Update 
        'Change this address to the test mailbox address.
        oMsg.To = "to@test.com" 
        'Change this to your address.
        oMsg.From = "from@test.com"  
        oMsg.Subject = "savesentitems Test!!" 
        oMsg.HTMLBody = "Look in the sent items folder!!!!" 
        oMsg.Send 
        Set oMsg = Nothing 
    End Sub 
    					
  5. Change the "To" address and the "From" address in the code.
  6. Run the code.
  7. Click the button on the form.
  8. Verify that the new test e-mail message appears in the mailbox. Then, verify that the e-mail message appears in the Sent Items folder.

↑ Back to the top


Keywords: KB321513, kbprb

↑ Back to the top

Article Info
Article ID : 321513
Revision : 9
Created on : 10/25/2007
Published on : 10/25/2007
Exists online : False
Views : 307