- 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'); }
- or download this
if ( ! -e $FORM{'template'}) {
&Error('Template File $FORM{template} Not Found - Error at sendma
+il subscript');
}
open (FILE, $FORM{'template'});<br>
- 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'
+);
- 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;
- or download this
$File =~ s/\[$Field]/$FORM{$Field}/g; # do you need an 'e' too?
}
print MAIL "$File\n"; }
close (MAIL);
}