You can download the script example files here.
1. Add both the form.html and formmail.asp files to your wwwroot or other folder where you plan to place the form.
2. In this example, form.html is the page that contains the form properties. You may create your own forms in Frontpage or Dreamweaver, but they will require the following lines for the formmail.asp file to process:<
* These variables are generally placed before the input fields of the form.
3. You must modify the recipients value to the address which you wish the form results to be sent to:
4. The formmail.asp file contains two sections that must be defined correctly. The following information is from the formmail.asp file:
* The items in bold red are the minimum items that need to be addressed within the formmail.asp script.
<%@ LANGUAGE="VBScript" %>
‘- Customization of these values is required, see documentation. ———–
‘- ** THIS MUST BE SET AS THE SAME DOMAIN NAME THATS HOSTING THE FORM AND SCRIPT! ** ———–
referers = Array("www.your-domain-name.com", "your-domain-name.com")
‘- SPECIFY SERVER INFORMATION – THE DEFAULT INFORMATION IS OK IN MOST CASES ———–
mailComp = "ASPMail"
‘- ** THIS MUST BE A VALID ADDRESS ON OUR NETWORK! ** ———–
fromAddr = "email@example.com"
‘- End required customization section. ————————————-
- Change the "referers" array to reflect your domain name. If you are still in the testing phase of your site or initial development (i.e. the domain is not "live" on our server yet) you’ll have to use your sites temporary domain name as a valid referring address.
- Make sure the "smtpServer" variable is set to smtp.appliedi.net and not your mail.your-domain-name or your-domain-name.com address. *see note below if this is for use in a non-shared hosting environment.
- Change the "fromAddr" variable to one of your email user account names.
7. Do not modify the code below the End required customization comment without first fully reviewing the documentation at http://www.brainjar.com/asp/formmail/
8. At this point both the form.html page and formmail.asp script will be functional.
NOTE – USING OUR SMTP SERVER (smtp.appliedi.net) WILL ONLY WORK IN SHARED-HOSTING ENVIRONMENT. IF YOU MANAGE YOUR OWN SERVER OR VPS YOU WILL NEED TO INSTALL MAIL SERVICE ON YOUR SERVER AND WHITELIST YOUR SERVER HOSTNAME or IP IN THE AUTHENTICATION BYPASS SETTINGS. Alternatively you can configure the above script to use SMTP authentication and authenticate to a POP3 email account.
SmarterTools offers a free version of Smartermail is needed that would work well for this purpose:
Content retrieved from: https://support.appliedi.net/kb/a394/setting-up-email-forms-with-aspmail-jmail-or-cdonts.aspx.