Francais     English
Perl Tools
Scripts CGI
       SSI Counter
       Random Img
       Random Text
       Random Link
       Redirect URL
       Text Clock
       Text Counter
       CGI Utils
Scripts PHP
HP 48
TI 92
Mini Messages
The Liste...
 Powered by


Form 2 Mail
Version 1.0

    What is it ?

        Form 2 Mail (form2mail.cgi) is a classical script who allow visitor to send
    some word into your E-Mail.

    System Requirements:

        - Perl 4.0 or newer; you can get it at http://www.perl.com/
        - A web server, you must have access to add / execute CGI scripts.
        - Unix Sendmail or Mail::Mailer module.

    Download current version

        Current version is v1.0, created 10/22/99, last modified 11/07/99.

        Download source code / scripts and documentations :
             Tar/Gzip archive : Form2Mail.tar.gz (0 Ko)
             DOS Zip format   : Form2Mail.zip (0 Ko)

    What this archive contains ?

        This archive comes with 5 differents files:
            1) COPYING:      Copyright informations (GPL).
            2) README:       This file.
            3) LISEZMOI:     French doc...
            4) form2mail.cgi: The Perl script.
            5) cgi-lib.pl:   CGI-Lib of Steven E. Brenner used here.

    Installation and Configuration:

        It's a Perl script, so installation is pretty easy. You don't need to
    compile anything.

    Copy form2mail.cgi, cgi-lib.pl in your /cgi-bin/ directory
        Make it executable, unix only (chmod a+rx form2mail.cgi)

    Edit form2mail.cgi, you will have to do some configuration:

    Change #/usr/bin/perl, if it's necessary...

    Change in "Necessary Variables Section"

    $Mail_To = "you\@foo.com";
            E-Mail to receive data (To:)

    $Mail_From = "webmaster\@foo.com";
            Sender E-Mail (From: )

    $Mail_Webmaster = "webmaster\@foo.com";
            Webmaster E-Mail : write into HTML result

            1 if you Use unix sendmail command, 0 to use Mail::Mailer module    

    $MAIL_CMD = "/usr/sbin/sendmail";
            Path and binary of sendmail command, only if you use sendmail

    $USE_HTML_MailTo = 0;
            Can Keep Receipt E-Mail from HTML Form, Warning, it's dangerous...

        $HTML_Title = "Thanks";    # Title who appear into HTML result page.
        $HTML_Message_Begin = "";  # Begin of HTML result page.
        $HTML_Message_End = "";    # Begin of HTML result page.
        $HTML_Back_Button = "Back"; # Text of Back Button in the HTML result page.
        $HTML_Display_Data = 1;
            # 0 Not display form data into HTML reseult page.

        # En : Common data for Mail message
        $Mail_Subject = "Informations from your form";  # Subject of mail
        $Mail_Message_Begin = ""; # Begin of Mail message
        $Mail_Message_End = "";   # End of Mail message

    $INVALID_MAIL_SENDER_ADDRESS_MESSAGE = "Error : Invalid Mail sender Adress : ";
            # Error Message if E-Mail sender is bad.

    @REFERERS    = ("http://www.host1.dom", "http://www.host2.dom");
            # URL(s) of server you can use this script.

    How to run it ?

        You should make a HTML form with data input who want to receive.
    examples :
        <FORM ... ACTION="http://www.hostname.dom/cgi-bin/form2mail.cgi">
        <INPUT TYPE="TEXT" NAME="Name" SIZE=30>
        <INPUT TYPE="TEXT" NAME="Adress" SIZE=30>
        <INPUT TYPE="SUBMIT" VALUE="Send">

    You should receive this into your mail :
            Date :      11/07/1999
            Name :      FTLS
            Address:    Bordeaux

    Nota :
        Many input can be use to change default parameters :
    Input Name         ||  Change Default variable
    Mail_To            -> $Mail_To
    Mail_From          -> $Mail_From
    Mail_Subject       -> $Mail_Subject
    Mail_Message_Begin -> $Mail_Message_Begin
    Mail_Message_End   -> $Mail_Message_End
    HTML_Title         -> $HTML_Title
    HTML_Message_Begin -> $HTML_Message_Begin
    HTML_Message_End   -> $HTML_Message_End
    HTML_Back_Button   -> HTML_Back_Button
    $HTML_Display_Data -> HTML_Display_Data  # if value eq No

    example :
        <FORM ... ACTION="http://www.hostname.dom/cgi-bin/form2mail.cgi">
        <INPUT TYPE="TEXT" NAME="Name" SIZE=30>
        <INPUT TYPE="TEXT" NAME="Mail_From" SIZE=30>
        <INPUT TYPE="TEXT" NAME="Mail_Subject" SIZE=30>
        <INPUT TYPE="SUBMIT" VALUE="Send">
        You should receive E-Mail with from: contain E-Mail's expeditor and subject
    chouse by it.

    Version history:

        Version 1.0         22/10/99  - Script Created.


        This software is copyright (C) 1999 Frederic TYNDIUK. It is distributed
    under the terms of the GNU General Public License (GPL). Because it is licensed
    free of charge, there is NO WARRANTY, it is provided AS IS. The author can not
    be held liable for any damage that might arise from the use of this software.
    Use it at your own risk.
        See the file COPYING for more details (or http://www.gnu.org/).

    Updates ?

        Latest version and New Scripts can be found at:



        Please feel free to contact me with any comments, suggestions, bug fixes
    criticism, or just a happiness messages.

    If you run into any problems while trying to configure these scripts
    first read this file carefully, if you don't find any solution, send me a Mail.

    E-Mail: tyndiuk@ftls.org
        Web: http://www.ftls.org/

                                                      Frederic TYNDIUK


© Copyright 2000 FTLS (Tyndiuk Frédéric). All rights reserved.
Last Update 08/03/2000 - Send all comments to webmaster@ftls.org