#!/usr/bin/perl

print "Content-type: text/plain\n\n";

# ($to, $from, $subject, $message)
sub main () {
	my ($to, $from, $subject, $message) = @_;
	my $sendmail = '/usr/lib/sendmail';
	open (MAIL, "|$sendmail -oi -t");
	print MAIL "From: $from\n";
	print MAIL "To: $to\n";
	print MAIL "Subject: $subject\n\n";
	print MAIL "$message\n";
	close(MAIL);
}

&main("jeff.carney\@snow.edu", "jeff.carney\@snow.edu", "html test", "http://www.snow.edu"); 

#end mail.cgi