"Fossies" - the Fresh Open Source Software Archive

Member "formmail_modules-3.14m1/FormMail.pl" (11 Aug 2004, 3647 Bytes) of package /linux/www/old/formmail_modules-3.14m1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "FormMail.pl" see the Fossies "Dox" file reference documentation.

    1 #!/usr/bin/perl -wT
    2 #
    3 # NMS FormMail Version 3.14m1
    4 #
    5 
    6 use strict;
    7 use vars qw(
    8   $DEBUGGING $emulate_matts_code $secure %more_config
    9   $allow_empty_ref $max_recipients $mailprog @referers
   10   @allow_mail_to @recipients %recipient_alias
   11   @valid_ENV $date_fmt $style $send_confirmation_mail
   12   $confirmation_text $locale $charset $no_content
   13   $double_spacing $wrap_text $wrap_style $postmaster 
   14   $address_style
   15 );
   16 
   17 # PROGRAM INFORMATION
   18 # -------------------
   19 # FormMail.pl Version 3.14m1
   20 #
   21 # This program is licensed in the same way as Perl
   22 # itself. You are free to choose between the GNU Public
   23 # License <http://www.gnu.org/licenses/gpl.html>  or
   24 # the Artistic License
   25 # <http://www.perl.com/pub/a/language/misc/Artistic.html>
   26 #
   27 # For help on configuration or installation see the
   28 # README file or the POD documentation at the end of
   29 # this file.
   30 
   31 # USER CONFIGURATION SECTION
   32 # --------------------------
   33 # Modify these to your own settings. You might have to
   34 # contact your system administrator if you do not run
   35 # your own web server. If the purpose of these
   36 # parameters seems unclear, please see the README file.
   37 #
   38 BEGIN
   39 {
   40   $DEBUGGING         = 1;
   41   $emulate_matts_code= 0;
   42   $secure            = 1;
   43   $allow_empty_ref   = 1;
   44   $max_recipients    = 5;
   45   $mailprog          = '/usr/lib/sendmail -oi -t';
   46   $postmaster        = '';
   47   @referers          = qw(dave.org.uk 209.207.222.64 localhost);
   48   @allow_mail_to     = qw(you@your.domain some.one.else@your.domain localhost);
   49   @recipients        = ();
   50   %recipient_alias   = ();
   51   @valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
   52   $locale            = '';
   53   $charset           = 'iso-8859-1';
   54   $date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
   55   $style             = '/css/nms.css';
   56   $no_content        = 0;
   57   $double_spacing    = 1;
   58   $wrap_text         = 0;
   59   $wrap_style        = 1;
   60   $address_style     = 0;
   61   $send_confirmation_mail = 0;
   62   $confirmation_text = <<'END_OF_CONFIRMATION';
   63 From: you@your.com
   64 Subject: form submission
   65 
   66 Thank you for your form submission.
   67 
   68 END_OF_CONFIRMATION
   69 
   70 # You may need to uncomment the line below and adjust the path.
   71 # use lib './lib';
   72 
   73 # USER CUSTOMISATION SECTION
   74 # --------------------------
   75 # Place any custom code here
   76 
   77 
   78 
   79 # USER CUSTOMISATION << END >>
   80 # ----------------------------
   81 # (no user serviceable parts beyond here)
   82 }
   83 
   84 use CGI::NMS::Script::FormMail;
   85 use base qw(CGI::NMS::Script::FormMail);
   86 
   87 use vars qw($script);
   88 BEGIN {
   89   $script = __PACKAGE__->new(
   90      DEBUGGING              => $DEBUGGING,
   91      name_and_version       => 'NMS FormMail 3.14m1',
   92      emulate_matts_code     => $emulate_matts_code,
   93      secure                 => $secure,
   94      allow_empty_ref        => $allow_empty_ref,
   95      max_recipients         => $max_recipients,
   96      mailprog               => $mailprog,
   97      postmaster             => $postmaster,
   98      referers               => [@referers],
   99      allow_mail_to          => [@allow_mail_to],
  100      recipients             => [@recipients],
  101      recipient_alias        => {%recipient_alias},
  102      valid_ENV              => [@valid_ENV],
  103      locale                 => $locale,
  104      charset                => $charset,
  105      date_fmt               => $date_fmt,
  106      style                  => $style,
  107      no_content             => $no_content,
  108      double_spacing         => $double_spacing,
  109      wrap_text              => $wrap_text,
  110      wrap_style             => $wrap_style,
  111      send_confirmation_mail => $send_confirmation_mail,
  112      confirmation_text      => $confirmation_text,
  113      address_style          => $address_style,
  114      %more_config
  115   );
  116 }
  117 
  118 $script->request;
  119