First a couple of notes. Cdonts.dll is not installed by default on Windows 2003. Typically you can grab it from an old Windows 2000 install CD. Upload it to %windir%\system32 directory.
The DLL needs to be registered once it’s uploaded. As long as it’s in the system32 directory, just go to Start -> Run.. and type:
regsvr32 cdonts.dll
<p style="margin: 0in; font-family: Verdana; font-size: 10pt;"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Test CDONTS asp Page</title>
</head>
<body bgcolor="#FFFFFF" text="#000033">
<div align="center">
<basefont face="ariallana" color="Black">
<b><font size="+1"><%= error%></font></b>
<%
message = message &amp; "==========Test==============" &amp; chr(13)
message = message &amp; "If you received this message, the CDONTS is working properly on your server" &amp; chr(13) &amp; chr(13)
message = message &amp; "Feel Free to modify this script to your needs to get your scripts working properly" &amp; chr(13) &amp; chr(13)
' Replace the email address below with your email address to test.'
MailTo = "youremailaddress@yourdomain.com"
MailFrom = "CDO-Test@domain.com"
if message <> "" then
set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.From = MailFrom
objNewMail.To = MailTo
objNewMail.Subject = "CDO Test Mail"
objNewMail.Body = message
objNewMail.BodyFormat = 0
objNewMail.MailFormat = 1
objNewMail.Importance = 1
objNewMail.Send
set objNewMail = Nothing
end if
%>
Thank you for testing the CDONTS on this server.<br>
Please check the email for <%= MailTo %> to verify it was successful
</body>
</html>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt;"></p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt;">