After submitting HTML contact form page redirects to Server Script (ASP/PHP) file in browser
Posted on 2016-08-03
When I submit a HTML contact form to get an email with form contents, the page redirects to my email.asp and displays the code in the browser instead of redirecting to Thanks.html page.
Here is the form code in HTML:
<form action="email.asp" name="form1" id="form1" method="post">
Here is the ASP code:
if not NewMailObj.Send("smtp.yourdomain.com") then
Set NewMailObj = nothing
How to prevent the page redirect to script and send an email.