Help for this page

Select Code to Download


  1. or download this
      sub SendMail {
    #  add debugging
          my $debug = 6;
          if (-e $FORM{'template'}) { }
          else { &Error('Template File Not Found - Error at sendmail subsc
    +ript'); }
    
  2. or download this
       
    if ( ! -e $FORM{'template'}) {
         &Error('Template File $FORM{template} Not Found - Error at sendma
    +il subscript'); 
    }
    
          open (FILE, $FORM{'template'});<br>
    
  3. or download this
       
          open (FILE, $FORM{'template'}) or die "can't open FILE $FORM{tem
    +plate}: $!";<br>
       
          @File = <FILE>; close (FILE);
          open (MAIL, "|$mailprog -t") || &Error('Unable to Open Sendmail'
    +);
    
  4. or download this
          open (MAIL, "|$mailprog -t") || &Error("Unable to Open $mailprog
    +: $!");
    print "<p>trying: $mailprog -t<br>
    ...
                  $ReplaceVar = $FORM{$Field}; 
                  $SearchVar = '\[' . $Field . '\]';
                  $File =~ s/$SearchVar/$ReplaceVar/g;
    
  5. or download this
      $File =~ s/\[$Field]/$FORM{$Field}/g;  # do you need an 'e' too?
              }        
          print MAIL "$File\n"; }
          close (MAIL);
      }