Article ID: 922738 - Last Review: November 21, 2006 - Revision: 1.2

An e-mail message may appear in the Badmail folder when you send the e-mail message by using Collaboration Data Objects for Windows NT Server (CDONTS)

We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:
http://www.microsoft.com/technet/security/prodtech/IIS.mspx (http://www.microsoft.com/technet/security/prodtech/IIS.mspx)
Expand all | Collapse all

SYMPTOMS

When you send an e-mail message by using Microsoft Collaboration Data Objects for Microsoft Windows NT Server (CDONTS), the e-mail message may appear in the Badmail folder. In the e-mail message, the addresses in the From box may be missing. Additionally, the e-mail message may be combined with other e-mail messages.

CAUSE

This issue occurs because a NewMail object in the CDONTS code is not set to the Nothing value after the NewMail object is used.

RESOLUTION

To resolve this issue, set each NewMail object to the Nothing value as soon as you finish using that NewMail object. The following Microsoft Visual Basic Scripting Edition (VBScript) code example shows how to create and send an e-mail message by using CDONTS.
	dim myCDONTSMail
	Set myCDONTSMail = CreateObject("CDONTS.NewMail")
	myCDONTSMail.MailFormat = 0
	myCDONTSMail.To = "to@to.com"
	myCDONTSMail.Subject = "Subject section"
	myCDONTSMail.Body = "Body section"
	myCDONTSMail.From = "from@from.com"
	myCDONTSMail.Send
	Set myCDONTSMail  = Nothing

MORE INFORMATION

For more information about CDONTS, click the following article numbers to view the articles in the Microsoft Knowledge Base:
324649  (http://support.microsoft.com/kb/324649/ ) Description of CDONTS and how to troubleshoot CDONTS problems in Windows 2000 and in Windows NT 4.0
319285  (http://support.microsoft.com/kb/319285/ ) E-mail messages generated by CDONTS go directly to Badmail folder
For more information about how to migrate from CDONTS to Collaboration Data Objects for Microsoft Windows 2000 (CDOSYS), click the following article number to view the article in the Microsoft Knowledge Base:
810702  (http://support.microsoft.com/kb/810702/ ) How to migrate the Collaboration Data Objects for NTS applications to Microsoft Collaboration Data Objects for Windows 2000

APPLIES TO
  • Microsoft Internet Information Services 5.0
  • Microsoft Collaboration Data Objects 2.0 for NT Server
  • Microsoft Active Server Pages 4.0
Keywords: 
kbfix kbtshoot KB922738
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations