Perl-based Form Mail (Feedback) Script

#!/usr/bin/perl
print “Content-type: text/html\n\n”;
#
$title=’Perl Mail demo’;
$to=’TO_Email’;
$from= ‘some-name@yourdomain.com’;
$subject=’perl mail’;

open(MAIL, “|/usr/sbin/sendmail -t”);

## Mail Header
print MAIL “To: $to\n”;
print MAIL “From: $from\n”;
print MAIL “Subject: $subject\n\n”;
## Mail Body
print MAIL “This is a test message
mail body text here\n”;

close(MAIL);

print “<html><head><title>$title</title></head>\n<body>\n\n”;

print “<h1>$title</h1><p>A message has been sent from $from to $to</p></body></html>”;