ITS Home Tech Support Laptop Program E Learning Media Services Communications
 

Web Services Home

How to obtain Webspace

Course1

Desire2Learn

Web Accessibility Guidelines

WSU Web Policy

HTML Tutorial

FTP Tutorial

Student Webs

Student Clubs

Webmail

 

Auto-Mailer Form Help Document

This help document shows how to create an
auto-mailer form with and without the option of password protection.
Sample: Auto mailer Form Without Password Protection

Auto-mailer Form Without Password Protection

    To begin building your auto-mailer form, open a new page and replace any existing code with the following code into your html editor
Sample: Auto mailer Form With Password Protection Password is demo
Sample: Jscript Code for Password Protection


<html>
<head>
<title> Sample Automailer Form </title>
</head>
<body>
<
form method="post" action="http://www.winona.edu/automailer/mail.asp">
<
input type="hidden" name="receiver" value="email_goes_here@winona.edu"><p>Sender's
Name: <
input type="text" name="sender" size="20"> <br>
Subject: <
input type="text" name="subject" size="20"> <br>
Body: <
input type="text" name="body" size="20"> <br>
<
input type="submit" name="Submit" value="Submit"> </p>
</form>
</body>
</html>


The following three fields need to be kept within this code:

        1.  Receiver
        2.  Sender
        3.  Subject

These fields can be found right after the name on Lines 7, 8, and 9.  These fields need to be kept in order to ensure that you are able to receive the data and that when you receive it, the data is legible.

You must also be sure that the form posts it's information correctly.  This can be done by making sure that you always post to the Course 1 server by leaving Line 6 exactly as shown above.

In most cases, you will want the email address that the form is being posted to to be hidden.  This will be automatically done for you if you leave Line 7 exactly as shown except for replacing the email_goes_here@winona.edu with the email address that you want people to post this form to.

Forms With Password Protection

    To create a form with password protection, you must follow all of the previous steps to create the initial form.  When that is completed, copy the following code into the very beginnning of your code.


<SCRIPT language="javascript">
var wrong="http://course1.winona.edu/noaccess.htm";
var password="
yourpassword";
var name = prompt("Password","Please Enter Authorization");
if (name != password) {location.href=wrong}
</SCRIPT>


The only change that you need to make to these lines of code is the area colored in red.  This is where you input the password that you want to use for the page.