#!/usr/bin/perl # This should match the mail program on your system. $mailprog = '/usr/lib/sendmail'; # This should be set to the username or alias that runs your # WWW server. $recipient = 'orders@corejava.com'; # Now send mail to $recipient print "Content-type: text/plain\n\n"; if (open (MAIL, "|$mailprog $recipient")) { while () { print MAIL; } close (MAIL); print "OK\n" } else { print "ERROR\n" }