CDONTS Example for ASP Hosting
This is an example of a CDONTS script that works with our ASP hosting plan. This script has an auto-redirection at the end of it.
NOTE: This script will not work on Windows® hosting plans running IIS 7.
Modify the items in italics below to match your particular settings.
from = request.form("from")
body = request.form("body")
subject = request.form("subject")
%>
<%
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = from
objMail.Subject = subject
objMail.To = "hard-code your email address"
objMail.Body = body
objMail.Send
Set objMail = Nothing
Response.redirect "thankyou.asp" '<- auto-redirection
'You must always do this with CDONTS.
'Change the page name to one that exists on your site.
%>