July 8th, 2004, 01:53 PM
Join Date: Jul 2004
Time spent in forums: < 1 sec
Reputation Power: 0
If you have asp and Cdonts support, you can just use the script below. Copy and paste and change the email to your own and change the redirect URL. I'm assuming that you can create your html form with the method = post and action = to the script file name (mines is send_email.asp). If you have any problems with it, let me know.
send_email.asp file starts here
Dim objNewMail, userName, userEmail, userComment
userName = Request.Form("userName")
userEmail = Request.Form("userEmail")
userComment = Request.Form("userComment")
' First create an instance of NewMail Object
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
' For objNewMail.From, you can use the one received from
' the form, userEmail, but if the user types in an invalid email
' you will not receive the email.
' So I just placed the user email in the subject of
' the email. Of course you could do a
' validation check but this is the simple way
objNewMail.From = "your_userid@your_domain.com"
objNewMail.To = "your_userid@your_domain.com"
objNewMail.Subject = "Any subject title you want"
objNewMail.Body = "Name: " & userName & " *** Email: " & userEmail & " *** Comments: " & userComment
' After the Send method, the NewMail Object become Invalid
' You should set it to nothing to relase the memory
Set objNewMail = Nothing
' If you want to send another mail
' you have to create a new instance of NewMail Object again.
--- end of script