#!/usr/bin/perl -w use strict; my $sendmail = "/usr/sbin/sendmail -t"; my $recipient = "schafferm\@ameritech.net"; open(SENDMAIL, "|$sendmail $recipient") or die "Cannot pipe to $sendmail: $!"; print SENDMAIL <<"END_MAIL"; From: Foo\@Bar.com Subject: Request to share information To: user\@ameritech.net Hello... END_MAIL close(SENDMAIL); print "Content-type: text/plain\n\nMail sent.";