Link to home
Start Free TrialLog in
Avatar of mybluegrass
mybluegrass

asked on

Use perl to forward emails

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?

Thanks!


ASKER CERTIFIED SOLUTION
Avatar of parparov
parparov
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Suhas .
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.