mattboy_slim
01-07-2003, 10:44 PM
How can I send an email to someone who has just filled out a form? They enter their email address into the form, but I'm not sure what I need to specify in the "CC" field of the CDONTS code to send the mail.
You can see, that right now I have specified: &request.form(Email) which does not work.
Here is the page:
http://www.lakesnewsshopper.com/submit.asp
Here is the code:
<%
if Request.Form("FFSubmitted") = "yes" then
Dim BodyString
Dim ExcludeFields
Dim objCDO
Dim RedirectURL
Set objCDO = Server.CreateObject("CDONTS.NewMail")
ExcludeFields = "addOver" & "wordsOver" & "amount" & "words" & "submit" & "FFSubmitted"
objCDO.From = "REQUEST: Classified"
objCDO.To = "***@***"
objCDO.Cc = "&request.form(Email)"
objCDO.Bcc = ""
objCDO.Subject = "Classified Ad Request"
BodyString = "Thank you for submitting your ad to Lakes News Shopper." & chr(13) &_
" " & chr(13) &_
"Please review the below information to ensure everything is correct." & chr(13) &_
"If any information below is incorrect, please send an email immediately to: sales@lakesnewsshopper.com" & chr(13) &_
" " & chr(13) &_
"Your Cost: "&request.form("Amount") & chr(13) &_
" " & chr(13) &_
"Name: "&request.form("Name") & chr(13) &_
"Email: "&request.Form("Email") & chr(13) &_
"Address: "&request.form("Address") & chr(13) &_
"City: "&request.form("City") & ", "&request.form("State") & " "&request.form("Zip") & chr(13) &_
"Phone: "&request.form("Phone") & chr(13) &_
"Weeks To Run Ad: "&request.form("Weeks_To_Run") & chr(13) &_
"Date To Start Ad: "&request.form("Date_To_Start") & chr(13) &_
"Ad Wording: "&request.form("Ad_Wording")
objCDO.Body = BodyString
objCDO.BodyFormat = 1
objCDO.MailFormat = 0
objCDO.Send
Set objCDO = Nothing
RedirectURL = "thanks.asp"
If RedirectURL <> "" then
If Request.QueryString <> "" Then
response.redirect(RedirectURL & "?" & Request.QueryString)
else
response.redirect(RedirectURL)
end If
end if
end if
%>
Thanks in advance for the help. This place has been great so far.
Matt
You can see, that right now I have specified: &request.form(Email) which does not work.
Here is the page:
http://www.lakesnewsshopper.com/submit.asp
Here is the code:
<%
if Request.Form("FFSubmitted") = "yes" then
Dim BodyString
Dim ExcludeFields
Dim objCDO
Dim RedirectURL
Set objCDO = Server.CreateObject("CDONTS.NewMail")
ExcludeFields = "addOver" & "wordsOver" & "amount" & "words" & "submit" & "FFSubmitted"
objCDO.From = "REQUEST: Classified"
objCDO.To = "***@***"
objCDO.Cc = "&request.form(Email)"
objCDO.Bcc = ""
objCDO.Subject = "Classified Ad Request"
BodyString = "Thank you for submitting your ad to Lakes News Shopper." & chr(13) &_
" " & chr(13) &_
"Please review the below information to ensure everything is correct." & chr(13) &_
"If any information below is incorrect, please send an email immediately to: sales@lakesnewsshopper.com" & chr(13) &_
" " & chr(13) &_
"Your Cost: "&request.form("Amount") & chr(13) &_
" " & chr(13) &_
"Name: "&request.form("Name") & chr(13) &_
"Email: "&request.Form("Email") & chr(13) &_
"Address: "&request.form("Address") & chr(13) &_
"City: "&request.form("City") & ", "&request.form("State") & " "&request.form("Zip") & chr(13) &_
"Phone: "&request.form("Phone") & chr(13) &_
"Weeks To Run Ad: "&request.form("Weeks_To_Run") & chr(13) &_
"Date To Start Ad: "&request.form("Date_To_Start") & chr(13) &_
"Ad Wording: "&request.form("Ad_Wording")
objCDO.Body = BodyString
objCDO.BodyFormat = 1
objCDO.MailFormat = 0
objCDO.Send
Set objCDO = Nothing
RedirectURL = "thanks.asp"
If RedirectURL <> "" then
If Request.QueryString <> "" Then
response.redirect(RedirectURL & "?" & Request.QueryString)
else
response.redirect(RedirectURL)
end If
end if
end if
%>
Thanks in advance for the help. This place has been great so far.
Matt