Web- og klassisk hosting Hjælp

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.
%>

Hjalp denne artikel?
Tak for din feedback. Benyt telefonnummeret til support eller chat-funktionen ovenfor, hvis du vil tale med en kundeservicerepræsentant.
Det glæder os, at vi kunne hjælpe! Er der andet, vi kan gøre for dig?
Beklager. Fortæl os, hvad du fandt forvirrende, eller hvorfor løsningen ikke løste dit problem.