Perl: Using the Unix mail program
Using the Unix mail program
# open the mail program for composing a messageopen(FH,"|mail -s \”A subject line...\" email\@blah.com");
# print text you want to send to the mail programprint FH “Text of the body of the message…”);print FH “More text…”);
#Mail gets sent here, when the filehandle is closedclose(FH);