Perl/sendmail question

by FODAC(at)aol.com

 Date:  Tue, 29 Jan 2002 16:58:04 EST
 To:  <hwg-techniques(at)mail.hwg.org>
  todo: View Thread, Original
I am trying to run the following script (I wanted to prove I could do this myself). The HTML appears just fine without any errors but the message is never sent. Is this a Perl problem or a sendmail problem?

TIA,

Kevin Riggs
fodac.org

#!/usr/bin/perl -wT

use strict;
use CGI;

my $handler;
my $sendmail;

my $name;
my $address;
my $city;
my $state;
my $zip;
my $code;
my $p1;
my $p2;
my $email;

$handler = CGI::new();

# $sendmail = "/usr/sbin/sendmail/ -t -i";

$name = $handler->param("name");

$email = 'fodac(at)aol.com';

print $handler->header();
print $handler->start_html(
        -title=>"Form data\n",
        -bgcolor=>"#ff1234");

print ("Thank you for e-mailing us");
print $handler->end_html();

open (MAIL, "| /usr/sbin/sendmail/ -t -i") || die ("cannot open");
print MAIL <<EOM;


To: Kevin Riggs <$email>;
From: $name;

EOM


close MAIL;

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA