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;

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. -- Cyrus H. Gordon

Replies are listed 'Best First'.
Re^2: Multiple attachments Outlook
by Anonymous Monk on Aug 25, 2005 at 18:41 UTC
    I cant send it through SMTP, I do not have access. Thanks though...