CDONTS won't work. CDOSYS should work fine. Here's a script I use for testing:
<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "192.161.1.10"
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "myemail@sample.com"
.To = "youremail@sample.com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Response.write "<HTML><head><title>A message has been sent.</title></head><body>A message has been sent.</body></HTML>"
%>
Replace the .To and .From email addresses as appropriate. Also chaneg the IP address of the SMTP server to yours.
If this doesn't work, tell us how you know it doesn't work. Just because the email didn't show up doesn't mean the code isn't working. Check the SMTP logs, check for firewalls, authentication requirements, spam filters and so on.
Jeff
Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at
Amazon.com