in reply to Multiple attachments Outlook
Why on earth would you do this with OLE? You are invoking a sledgehammer when you need a flyswatter.
I would recommend MIME::Lite for this task.
use MIME::Lite; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'autoscript@my.com', To =>'me@my.com', Subject =>'Credit Limit Increase (D & M)', Type =>'multipart/mixed' ); ### Add parts $msg->attach(Type =>'TEXT', Data =>"Tom,\nhere are the Credit Limit Reports." ); foreach my $attach (@attach) { next unless ( -e $attach); $msg->attach(Type =>'application/vnd.ms-excel', Path => $attach, Filename => $attach, Disposition => 'attachment' ); } MIME::Lite->send('smtp', "smtp.my.com", Timeout=>60); $msg->send;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple attachments Outlook
by Anonymous Monk on Aug 25, 2005 at 18:41 UTC |