Article ID: 186204 - Last Review: April 28, 2005 - Revision: 2.1 How to use CDONTS to collect and mail information from a userThis article was previously published under Q186204 SUMMARY
This article contains an example that describes how to collect information
from a user on a .HTM page, and then use that information to send mail to a
recipient using Collaboration Data Objects for Windows NT Server (CDONTS)
over SMTP. This article includes sample code for the HTM and ASP files as
well as information on how to configure your Microsoft Management Console
(MMC) Default SMTP Server.
MORE INFORMATION
The syntax for sending mail with the NewMail object of CDONTS is as
follows:
objNewMail.Send([From][, To][, Subject][, Body][, Importance] )
objNewMail
Required. This NewMail object.
From
Optional. String. The full messaging address to be identified as
the sender (for example, someone@Microsoft.com)
To
Optional. String. A list of full messaging addresses of recipients.
The individual recipient addresses are separated by semicolons.
(for example, someone@Microsoft.com)
Subject
Optional. String. The subject line for the message.
Body
Optional. IStream object or String. The text of the message. Only
C/C++ and Java programs can use an IStream object for the Body
parameter. They should pass an IUnknown object that returns an
IStream interface in response to QueryInterface. Microsoft Visual
Basic supports the IDispatch interface and not IUnknown, so it
cannot use an IStream object.
Importance
Optional. Long. The importance associated with the message, High,
Normal or Low. This article sets the required value depending upon
which option button the user selects.
REFERENCES
Collaboration Data Objects Help; search on "Collaboration Data Objects for
NTS Component"; topic: "NewMail Object (CDONTS Library)"
| Article Translations
|

Back to the top
