spacer.gif (841 bytes) North Central Kansas Community Network


News Search
Town Square
Youth Center
Senior Center
Community Economic Development

How to do Forms with NCKCN CGI MAILTO executable for Windows Servers


This example is the hypertext content of a typical form:

<FORM ACTION="/scripts/mailto.exe" METHOD="post">
<input type="hidden" NAME="sendto" VALUE="">
<Input type="hidden" Name="server" value="">
<INPUT TYPE="hidden" NAME="subject" value="Web Page Form">
<INPUT type="hidden" NAME="resulturl" value="">


<B>Your details:</B>
Name:            <INPUT NAME="uname" SIZE=30>
Position:        <INPUT NAME="title" SIZE=30>
Company Name:    <INPUT NAME="company" SIZE=40>
E-Mail:          <INPUT NAME="email" SIZE=30>

Press <INPUT TYPE="submit" VALUE="Submit"> and your request will be processed or
<INPUT TYPE="reset" VALUE="Clear"> to start again.
We aim to respond within 24 hours.


When the user presses the SUBMIT button, the information is sent to the WWW server which calls /scripts/mailto.exe. MAILTO will read the details sent and format a message which looks something like:

From: A N Other <>
To: <>
Subject: Web Page Form
Date: Thu, 22 Jun 99 13:22:28 GMT-0600

The following form contents were entered on 22nd Jun 95
Date = 22 Jun 95 13:22:26
subject = Web Page Form
uname = A N Other
title = Network Administrator
company = Elephants Inc
email =

The Fields

This is a list of fields that the MAILTO will automatically use. All other fields will be decoded and placed into the mail message.

  • sendto The address of the recipient of the email message. This field is mandatory.
  • cc A comma separated list of other recipients of the form contents. This is optional.
  • server Name of mail server to send the mail to. This must be a legitimate SMTP Server name and if omitted the localhost will be used.
  • subject The subject of the mail message (optional).
  • resulturl The full URL for the next page to display.
  • resulttxt Some text that is displayed in the Thank you message.
  • uname Name of the user (which will be inserted into the from clause to aid filing). Optional.
  • email The email address of the person filling the form. The contents of this field will also be placed into the From: clause of the mail message. When you receive this message, you will be able to type "Reply" and reply to the person who filled the form. (What could be easier?) (optional).

If neither resulturl nor resulttxt are displayed, you will see the default "Thank You" message. The user will have to use the "Back" button as there will be no links for further navigation.

If you have support or general questions please email us at:
If you have any comments or questions about the NCKCN System, you can reach NCKCN by e-mail at:

This page last updated 01/16/12 01:32:08 PM
1996-2012 North Central Kansas Community Network