Last post Oct 08, 2010 04:21 PM by atconway
Oct 04, 2010 08:54 PM|malik999|LINK
I need to submit a website form. The below appears to work but i am not sure if its secure/vulnerable etc.
Any input appreciated
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Webform"
Mailer.RemoteHost = "=your web server"
Mailer.AddRecipient "Name", "firstname.lastname@example.org"
Mailer.Subject = "Form Submission"
strMsgHeader = "Form information follows" & vbCrLf
for each qryItem in Request.Form
strMsgInfo = strMsgInfo & qryItem & " - " & request.Form(qryItem) & vbCrLf
strMsgFooter = vbCrLf & "End of form information"
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter
if Mailer.SendMail then
Response.Write "Your form submission failed. Please use your browser back button and use a email address to contact us so that we can assist you. Error was " & Mailer.Response
set Mailer = Nothing
Oct 05, 2010 12:34 AM|riswadkarharshad|LINK
Are you working on Classic ASP code? I went through your post and it looked like it so just wanted to check.
Oct 05, 2010 09:40 AM|malik999|LINK
I didnt write it im afraid. With so many formmail scripts available its difficult to know which is secure/safe to use.
Oct 08, 2010 04:21 PM|atconway|LINK
Unfortunately the code you posted is classic ASP code and not ASP.NET code which this forum is geared for support. You will want to visit the following forum link to ask your question again, where this language is supported:
ASP, VB Script Forums: