MAILTO Program

MAILTO.EXE will allow you to create your own form and have the results formatted and sent to one (or more) e-mail addresses. You need to specify From: address, To: address, and subject of the mail and (if you use the right fields), the mail will appear at your chosen account with the correct user name and email address (so that you can reply to it).

To install it, download MAILTO.ZIP, unzip it and then copy MAILTO.EXE to the appropriate directory under Htdocs on your virtual server. You must then "Allow Execute" settings for this directory: in HostPilot, under "Web/FTP Server > Tools > Permissions", select the directory containing MAILTO.EXE, and grant "Allow Execute".

Mail server used in this example will accept mail from all web sites hosted at Intermedia.NET.

Example of HTML code

<FORM ACTION="/CGI-BIN/MAILTO.EXE" METHOD="POST">
<INPUT TYPE="hidden" NAME="sendto" VALUE="test@intermedia.net">
<INPUT TYPE="hidden" NAME="email" VALUE="postmaster@yourdomain.xxx">
<INPUT TYPE="hidden" NAME="server" VALUE="scriptmail.intermedia.net">
<INPUT TYPE="hidden" NAME="subject" VALUE="Test Application Form">
<INPUT TYPE="hidden" NAME="resulturl" VALUE="http://www.intermedia.net/support/ntmail/done.html">

Your details:

Name: <INPUT NAME="uname" SIZE=30>
Position: <INPUT NAME="title" SIZE=30>
Company: <INPUT NAME="company" SIZE=30>
E-Mail: <INPUT NAME="email" SIZE=30>
Comments: <INPUT NAME="comments" SIZE=60>

Press <INPUT TYPE="submit" VALUE="Submit"> and your request will be processed or
<INPUT TYPE="reset" VALUE="Clear"> to start again.

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

From: A N Other <other@company.com>
To: <mailto@intermedia.net>
Subject: Test Application Form
Date: Thu, 22 Jun 95 13:22:28 GMT+0000

The following form contents were entered on 22nd Jun 95
Date = 22 Jun 95 13:22:26
subject = Test Application Form
uname = A N Other
title = Network Administrator
company = Elephants Inc
email = other@company.com
comments = some comments
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 receipient of the email message. This field is mandatory.
  • cc A comma seperated list of other receipients of the form contents. This is optional.
  • server Name of mail server to send the mail to. This must be a valid MX record and may not be ommitted.
  • subject The subject of the mail message (optional).
  • resulturl The full URL for the next page to dispaly.
  • 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 specified, you will see the default "Thank you" message.

MAILTO.EXE program also allows you to specify:

  • That certain fields are required.
  • That environmental variables are added to the mail message.
  • Check that an entry is a number.
  • Check that an entry is made.
  • Check an entry is an email address.
  • Specify a counter.

| home | hosting services | support | reseller program |