I'm been using Mail::POP3Client to parse email from exchange server. I can get all the information I need including attachments and save the attachment on the linux box. But when the filename is too long, I need to find a way to forward the email to an error account. I used this to get the $message from exchange server:
$pop3 = new Mail::POP3Client(
USER => "$USERNAME[$i]",
PASSWORD => "$PASSWORD[$i]",
HOST => "$HOST[$i]",
USESSL => 1
my $message = $pop3->HeadAndBody($i); where $i is the index of the email.
If I find something wrong with the message (say, filename too long), is there a way to forward this $message without going to extracting all the information including attachments in order to use MIME::Lite?