$sender="email@\somewhere.com"; $recipient="email@\somewhere.com"; $subject="Database Entry"; $mail_prog = "/usr/sbin/sendmail -t"; $mail_out="true"; if($mail_out) { &SendMail($recipient,$sender); sub SendMail { open(MAIL, "|$mail_prog -t") || &error("Could not send out emails"); print MAIL "To: $recipient \n"; print MAIL "From: $sender <$sender>\n"; print MAIL "Subject: database entry\n"; print MAIL "added\n\n"; print MAIL"-----------------------------------------------------------------------------------------\n"; print MAIL ""; print MAIL "\n\n"; print MAIL "\n\n"; close (MAIL); } # end SendMail function } # end if statement