Guest User

Untitled

a guest
Nov 23rd, 2017
2,310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. mail_to = "dkillone@gmail.com"
  2.  
  3. Dim error
  4. error = 0
  5. For Each f In Request.Form
  6. If Request.Form(f) = "" Then
  7. error = 1
  8. End If
  9. Next
  10. If error=1 Then
  11. response.redirect "error.html"
  12. Else
  13. Dim f, emsg, mail_to, r, o, c, other
  14. fline = "_______________________________________________________________________"& vbNewLine
  15. hline = vbNewLine & "_____________________________________"& vbNewLine
  16. emsg = ""
  17.  
  18. For Each f In Request.Form
  19. If mid(f,1,1)<>"S" = True Then &#039;do not save if input name starts with S
  20. emsg = emsg & f & " = " & Trim(Request.Form(f)) & hline
  21. End If
  22. Next
  23.  
  24. Set objNewMail = Server.CreateObject("CDONTS.NewMail")
  25. objNewMail.From = Request("Email Address")
  26. objNewMail.Subject = "Message from contact page (version: 1.0)"
  27. objNewMail.To = mail_to
  28. objNewMail.Body = emsg & fline
  29. objNewMail.Send
  30. Set objNewMail = Nothing
  31.  
  32. response.redirect "thankyou.html"
  33. End if
  34. %>
Add Comment
Please, Sign In to add comment