Question
Sending form to Emai using ASP
here is my script
it seems as though it works (it redirects to the "Thanks" page) however when i check my meail, i recieve nothing
<%
' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim FirstName
Dim LastName
Dim month
Dim day
Dim year
Dim email
' get posted data into variables
EmailFrom = Trim(Request.Form("email"))
EmailTo = "admin@dropinfitness.com"
Subject = "Every Internet Game Guestlist"
fname = Trim(Request.Form("fname"))
lname = Trim(Request.Form("lname"))
month = Trim(Request.Form("month"))
day = Trim(Request.Form("day"))
year = Trim(Request.Form("year"))
email = Trim(Request.Form("email"))
' prepare email body text
Dim Body
Body = Body & "fname: " & fname & VbCrLf
Body = Body & "lname: " & lname & VbCrLf
Body = Body & "month: " & month & VbCrLf
Body = Body & "day: " & day & VbCrLf
Body = Body & "year: " & year & VbCrLf
Body = Body & "email: " & email & VbCrLf
' send email
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send
' redirect to success page
Response.Redirect("Thanks.html?" & EmailFrom)
%>
it seems as though it works (it redirects to the "Thanks" page) however when i check my meail, i recieve nothing
<%
' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim FirstName
Dim LastName
Dim month
Dim day
Dim year
Dim email
' get posted data into variables
EmailFrom = Trim(Request.Form("email"))
EmailTo = "admin@dropinfitness.com"
Subject = "Every Internet Game Guestlist"
fname = Trim(Request.Form("fname"))
lname = Trim(Request.Form("lname"))
month = Trim(Request.Form("month"))
day = Trim(Request.Form("day"))
year = Trim(Request.Form("year"))
email = Trim(Request.Form("email"))
' prepare email body text
Dim Body
Body = Body & "fname: " & fname & VbCrLf
Body = Body & "lname: " & lname & VbCrLf
Body = Body & "month: " & month & VbCrLf
Body = Body & "day: " & day & VbCrLf
Body = Body & "year: " & year & VbCrLf
Body = Body & "email: " & email & VbCrLf
' send email
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send
' redirect to success page
Response.Redirect("Thanks.html?" & EmailFrom)
%>
