ASP EMAIL FORM PROCESSOR

Many hosts, such as my host 1planhost.com, has either Cold Fusion or ASP installed on their servers. Either of these can be use to process an email form so that no one can determine your email address.

The ACTION of your form would look like this:

<form name="commentform" method=post action="processform.asp">

When the visitor clicks the submit button, the contents of the form are sent to the page, processform.asp. The asp code on this page can not be seen using a browser's VIEW > SOURCE so your email address can not be "taken".

THE ASP PROCESSOR PAGE CODE

Here is the ASP code that I use on my site. The BOLD BLUE TEXT is what you have to replace with your own information. The text is the names associated with the form elements, e.g. my form using an entry <input type="text" name="emailaddress">. So in my ASP page that processes the form emailaddress is the visitor's email address. If you are not familiar with naming form elements then please see my form's element help page. You should check with your host for the correct asp "Set Mailer" code.

<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "YOUR-DOMAIN-NAME-SMTP-ADDRESS"
Mailer.AddRecipient "YOUR-NAME", "YOUR-EMAIL-ADDRESS"
Mailer.FromName = Request.Form("name")
Mailer.FromAddress = Request.Form("emailaddress")
Mailer.Subject    = Request.Form("subject")
Msg = "Comments: " & Request.Form("comments")& vbCrLf & vbCrLf
Msg = Msg & " Can use in What People Say? " &Request.Form("use") & vbCrLf & vbCrLf
Mailer.BodyText   = Msg 
if Mailer.SendMail then 
   Response.Write "

You email was sent. You should get a reply within 24 hours." else Response.Write "<p><b><font size=2 face='verdana,arial' color='#cc0000'> Email could not be sent. Use the BACK BUTTON to go back and check your entries. Be sure your email address is in the format: name@someplace.com</font> Error was </b>" & Mailer.Response end if %>

The vbCrLf causes a line break in the email that is sent to you. The Mailer.Sendmail asp function sends the email. The if statement simply displays the appropiate message if the function was completed (true) or not (false).