Web Hosting Doc
Published: Jan 16th, 2012
Re-Posted: May 16th, 2017
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="firstname.lastname@example.org">
<Input type="hidden" Name="server" value="nt1.nckcn.com">
<INPUT TYPE="hidden" NAME="subject" value="Web Page Form">
<INPUT type="hidden" NAME="resulturl" value="http://www.nckcn.com/homepage/username/formdone.htm">
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 <email@example.com>
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 = firstname.lastname@example.org
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 form 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.