#!/usr/pkg/bin/perl
# Process Email
# For now, write each email to a log file.
# Each email is separated with a horizontal bar
# and a couple of carriage returns.
# Emails are easy to process because we can count
# on things like
# From, To, Date, Subject
# This program is invoked from the e-mail system
# via procmail whenever an e-mail is received.
# Email will forward to procmail via STD pipes
# So just grab everything from STDIN and write to a file
$OUTPUT_FILENAME = ">>doc/outputfile.txt";
# Open log file
open($OUTPUT,$OUTPUT_FILENAME);
# Write everything from STDIN to a file
while() {
print $OUTPUT $_;
}
print $OUTPUT "\n---------------------------------------------------\n";
close($OUTPUT);
# To Do:
#
# The output file will depend on the game type, get from the Subject