#!/usr/bin/perl use Win32::OLE; use Win32::OLE::Const; use Win32::OLE::Const 'Microsoft Outlook'; # #Send email using outlook @attach = ("H:\\Scripts\Chandras reports\\Limit Increase(M) 072005.xls +", "H:\\Scripts\\Chandras reports\\Limit Increase(D) 072005.xls"); $mail = new Win32::OLE('Outlook.Application'); $safe = new Win32::OLE('Redemption.SafeMailItem'); # #$mail->{'Visible'} = 1; $item = $mail->CreateItem(0); $item->{'Subject'} = "Credit Limit Increase (D & M)"; $item->{'To'} = "me\@my.com"; $item->{'Body'} = "Tom,\nhere are the Credit Limit Reports."; #my $attachments = $item->Attachments(); #$attachments->Add(@attach); foreach my $attach (@attach) { # Verify the existence of the file attachment next unless ( -e $attach ); # Go ahead and attach this file my $Attachments = $item->Attachments(); $Attachments->Add($attach); } $item->Send(); $item->Quit();
In reply to Multiple attachments Outlook by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |