Perl: Sendmail
Sendmail
open(FH, "|/usr/lib/sendmail -t");
print FH "From: ericl\@webmaster.merrimack.edu\n";
print FH "To: ericl\@webmaster.merrimack.edu\n";
print FH "Subject: A simple email message\n\n";# notice the double newlines, they separate the header# section from the message body (just like HTTP)
print FH "This is the body of my email . . .\n";close(FH);
This opens a filehandle to the sendmail program and constructs a simple email message