Setting up email forms with ASPmail, Jmail or CDONTS

* Note the following script was taken from http://www.brainjar.com/asp/formmail/. Full Documentation and explanations may be found at this site.

 

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:

Example:  

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" %>
<% ‘***************************************************************************
‘* ASP FormMail *
‘* *
‘* Do not remove this notice. *
‘* *
‘* Copyright 1999-2002 by Mike Hall. *
‘* Please see
http://www.brainjar.com for documentation and terms of use. *
‘***************************************************************************

‘- 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"
smtpServer = "smtp.appliedi.net"

‘- ** THIS MUST BE A VALID ADDRESS ON OUR NETWORK! ** ———–

fromAddr = "username@your-domain-name.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:
http://www.smartertools.com/free-editions.aspx

 

 

Content retrieved from: https://support.appliedi.net/kb/a394/setting-up-email-forms-with-aspmail-jmail-or-cdonts.aspx.

Updated on November 11, 2019

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
CONTACT SUPPORT