DeliriumNZ has asked for the wisdom of the Perl Monks concerning the following question:
If you could help me that would be greatly appreciated.use Win32::OLE; use Win32::OLE qw(in with); use Win32::OLE::Variant; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->GetActiveObject ('Outlook.Application') || Win32::OLE->new('Outlook.Application'); my $Outlook = new Win32::OLE('Outlook.Application'); # Create Mail Item my $item = $Outlook->CreateItem(0); # 0 = mail item. unless ($item) { die "Outlook is not running, cannot send mail.\n"; } $item->{'Subject'} = $mail_props{'subject'} || '[No Subject]'; $item->{'To'} = join (";", split(/[ ,;]+/, $mail_props{'to'})); $item->{'Body'} = $mail_props{'body'} || "\r\n"; $item->{'From'} = $mail_props{'to'}; # 2=high, 1=normal, 0=low $item->{'Importance'} = 1; # Send the Email $item->Send();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending mail in outlook
by Gangabass (Vicar) on Sep 15, 2009 at 02:06 UTC | |
|
Re: Sending mail in outlook
by Bloodnok (Vicar) on Sep 14, 2009 at 22:34 UTC | |
by Anonymous Monk on Sep 14, 2009 at 22:42 UTC | |
by Bloodnok (Vicar) on Sep 14, 2009 at 22:48 UTC |