M
Mark
When a form is filled in on my website it is sent to the below .asp page. I
want the information from the form to be sent to me, which it does, but I
would also like a confirmation email to be sent to the user. Is there
anything i can add to the code below to do this?
<%
dim contactName, contactEmail, contactMessage, isSubmitted, nameRequired,
EmailRequired
isSubmitted = request.form("submit")
If isSubmitted <> "isSubmit" Then
contactName = ""
contactEmail = ""
contactMessage = ""
nameRequiredMessage =""
EmailRequiredMessage =""
Else
contactName = request.form("name")
contactEmail = request.form("email")
contactMessage = request.form("message")
End If
if contactName="" then
nameRequiredMessage = "Please enter your Name"
end if
if contactEmail="" then
EmailRequiredMessage = "Please enter your Email"
end if
If contactName<>"" and contactEmail<>"" then
Dim objCDONTS ' Email object
Dim strSubject, strBody ' Message
Dim misccompo
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
objCDONTS.From = contactName & " <" & contactEmail & ">"
objCDONTS.To = "(e-mail address removed)"
objCDONTS.Subject = "dcs"
objCDONTS.Body = "--------------------------------------" & vbcrlf & vbcrlf
& contactMessage & vbcrlf & vbcrlf & vbcrlf &
"--------------------------------------------------------------" & vbcrlf &
"MESSAGE ENDS: End of message"
objCDONTS.Send
Set objCDONTS = Nothing
response.redirect "thanks.asp"
response.end
end if
%>
%>
want the information from the form to be sent to me, which it does, but I
would also like a confirmation email to be sent to the user. Is there
anything i can add to the code below to do this?
<%
dim contactName, contactEmail, contactMessage, isSubmitted, nameRequired,
EmailRequired
isSubmitted = request.form("submit")
If isSubmitted <> "isSubmit" Then
contactName = ""
contactEmail = ""
contactMessage = ""
nameRequiredMessage =""
EmailRequiredMessage =""
Else
contactName = request.form("name")
contactEmail = request.form("email")
contactMessage = request.form("message")
End If
if contactName="" then
nameRequiredMessage = "Please enter your Name"
end if
if contactEmail="" then
EmailRequiredMessage = "Please enter your Email"
end if
If contactName<>"" and contactEmail<>"" then
Dim objCDONTS ' Email object
Dim strSubject, strBody ' Message
Dim misccompo
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
objCDONTS.From = contactName & " <" & contactEmail & ">"
objCDONTS.To = "(e-mail address removed)"
objCDONTS.Subject = "dcs"
objCDONTS.Body = "--------------------------------------" & vbcrlf & vbcrlf
& contactMessage & vbcrlf & vbcrlf & vbcrlf &
"--------------------------------------------------------------" & vbcrlf &
"MESSAGE ENDS: End of message"
objCDONTS.Send
Set objCDONTS = Nothing
response.redirect "thanks.asp"
response.end
end if
%>
%>