close MSG;
####
open (MSG, ">>mailmessage") or die "File open failed: $!\n";
##
##
/tmp/mailparser.pl < mail.message.file
##
##
#/etc/aliases entry
## The below entry saves an unaltered copy on account original, and
## pipes the incoming message through our program which
## resends to the final destination account. Be sure to execute
## 'newaliases' after you modify the /etc/aliases for the changed
## entry to be updated.
original: \original, "|/tmp/mailparser.pl"
##
##
##
# MboxParser stuff here
##
use MIME::Lite;
my $msg = new MIME::Lite
To => 'targetaccount@same.site.net',
From => $from,
Cc => $cc,
Subject => $subject,
Type => 'TEXT',
Comments => $to, ## save original to: if needed
Data => $body_str;
MIME::Lite->send('smtp', "some.smtp.net", Timeout=>60);
$msg->send;