QuizToon
08-23-2005, 10:20 PM
I run a small online quiz where the answers are sent o me via email on the click of a submit button.
I have the following script on my server which processes the information and forwards an email to me with the answers and senders information.
What I would like is for it also to send the same email to the sender, so they can check back on their answers when i publish the answers/results.
I am guessing that there will be some code that i add to the recipient partof the script.
Please could someone take a look at the script and tell me how and where i put the code
Many Thanks
Quiztoon
<%
SenderEmail = Request.Form("visitor_email_address")
Subject = "Links Quiz Answers"
Recipient = "linksquiz@quiztoon.co.uk"
'Get Time / Date
my_date = FormatDateTime(now(),1)
my_time = FormatDateTime(now(),4)
Body = "SUBMITTERS DETAILS - " & vbcrlf & vbcrlf
Body = Body & "Submitted On : " & my_date & vbcrlf
Body = Body & "Submitted At : " & my_time & " GMT" & vbcrlf
Body = Body & "Submitted By : " & Request.Form("visitor_name") & vbcrlf
Body = Body & "Email Address : " & Request.Form("visitor_email_address") & vbcrlf
Body = Body & "Senders gender : " & Request.Form("gender") & vbcrlf & vbcrlf
Body = Body & "ANSWERS SUBMITTED - " & vbcrlf & vbcrlf
Body = Body & "Answer to Question 1 : " & Request.Form("answer1") & vbcrlf
Body = Body & "Answer to Question 2 : " & Request.Form("answer2") & vbcrlf
Body = Body & "Answer to Question 3 : " & Request.Form("answer3") & vbcrlf
Body = Body & "Answer to Question 4 : " & Request.Form("answer4") & vbcrlf
Body = Body & "Answer to Question 5 : " & Request.Form("answer5") & vbcrlf & vbcrlf
Body = Body & "Answer to Link 1 : " & Request.Form("link1") & vbcrlf & vbcrlf
Body = Body & "Answer to Question 6 : " & Request.Form("answer6") & vbcrlf
Body = Body & "Answer to Question 7 : " & Request.Form("answer7") & vbcrlf
Body = Body & "Answer to Question 8 : " & Request.Form("answer8") & vbcrlf
Body = Body & "Answer to Question 9 : " & Request.Form("answer9") & vbcrlf
Body = Body & "Answer to Question 10 : " & Request.Form("answer10") & vbcrlf & vbcrlf
Body = Body & "Answer to Link 2 : " & Request.Form("link2") & vbcrlf & vbcrlf
Body = Body & "SENDERS COMMENTS : " & vbcrlf & vbcrlf & Request.Form("comments")
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.quiztoon.co.uk"
JMail.Sender = SenderEmail
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.Body = Body
JMail.Priority = 1
JMail.Execute
Response.Redirect("thank_you.html")
%>
I have the following script on my server which processes the information and forwards an email to me with the answers and senders information.
What I would like is for it also to send the same email to the sender, so they can check back on their answers when i publish the answers/results.
I am guessing that there will be some code that i add to the recipient partof the script.
Please could someone take a look at the script and tell me how and where i put the code
Many Thanks
Quiztoon
<%
SenderEmail = Request.Form("visitor_email_address")
Subject = "Links Quiz Answers"
Recipient = "linksquiz@quiztoon.co.uk"
'Get Time / Date
my_date = FormatDateTime(now(),1)
my_time = FormatDateTime(now(),4)
Body = "SUBMITTERS DETAILS - " & vbcrlf & vbcrlf
Body = Body & "Submitted On : " & my_date & vbcrlf
Body = Body & "Submitted At : " & my_time & " GMT" & vbcrlf
Body = Body & "Submitted By : " & Request.Form("visitor_name") & vbcrlf
Body = Body & "Email Address : " & Request.Form("visitor_email_address") & vbcrlf
Body = Body & "Senders gender : " & Request.Form("gender") & vbcrlf & vbcrlf
Body = Body & "ANSWERS SUBMITTED - " & vbcrlf & vbcrlf
Body = Body & "Answer to Question 1 : " & Request.Form("answer1") & vbcrlf
Body = Body & "Answer to Question 2 : " & Request.Form("answer2") & vbcrlf
Body = Body & "Answer to Question 3 : " & Request.Form("answer3") & vbcrlf
Body = Body & "Answer to Question 4 : " & Request.Form("answer4") & vbcrlf
Body = Body & "Answer to Question 5 : " & Request.Form("answer5") & vbcrlf & vbcrlf
Body = Body & "Answer to Link 1 : " & Request.Form("link1") & vbcrlf & vbcrlf
Body = Body & "Answer to Question 6 : " & Request.Form("answer6") & vbcrlf
Body = Body & "Answer to Question 7 : " & Request.Form("answer7") & vbcrlf
Body = Body & "Answer to Question 8 : " & Request.Form("answer8") & vbcrlf
Body = Body & "Answer to Question 9 : " & Request.Form("answer9") & vbcrlf
Body = Body & "Answer to Question 10 : " & Request.Form("answer10") & vbcrlf & vbcrlf
Body = Body & "Answer to Link 2 : " & Request.Form("link2") & vbcrlf & vbcrlf
Body = Body & "SENDERS COMMENTS : " & vbcrlf & vbcrlf & Request.Form("comments")
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.quiztoon.co.uk"
JMail.Sender = SenderEmail
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.Body = Body
JMail.Priority = 1
JMail.Execute
Response.Redirect("thank_you.html")
%>