$mailProg = "/usr/sbin/sendmail -t"; open (MAIL, "|$mailProg"); print MAIL "Date: $mailheader_date -0500\n"; print MAIL "To: $recipient\n"; print MAIL "From: $adminEmail\n"; print MAIL "Subject: Borrow Request\n"; print MAIL "***********************************\n"; (more print statements with the body of the msg in here) close (MAIL);