Forums
 This topic is locked 
             ASP Mailer Script Validation - please help!
 29 Jan 2003  11:16:36 mark capa posted: 
 <font face='Verdana'>Hi,I have a form that submits to a ASP mailer script which in turn generates an email of the the form results. However, I'm wanting to prevent the mailer script from being accessed directly, which causing a blank email to be sent.
Any help on this would be very much appreciated.
Regards,
Mark
</font id='Verdana'>
www.gwenap.net
Free Vibrators to European countries.
Spice Up Your Sex Life!
Replies
 Replied 02 Feb 2003  18:00:48 
   02 Feb 2003  18:00:48 johan tessens replied: 
  Check on the page that contains the mailer script if the form values contains data like example
If Request.Form("info" ="" then
="" then
Response.Redirect "error.asp"
or insert in your form a hidden field named checkmail value OK. On your mailer script page check with
If Request.Form("checkmail" ="OK" then.. do mailing script else redirect to error page
="OK" then.. do mailing script else redirect to error page 
  If Request.Form("info"
 ="" then
="" thenResponse.Redirect "error.asp"
or insert in your form a hidden field named checkmail value OK. On your mailer script page check with
If Request.Form("checkmail"
 ="OK" then.. do mailing script else redirect to error page
="OK" then.. do mailing script else redirect to error page