Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
That code yeilds this error message:#!perl -w use strict; use Win32::OLE; my $servername = 'NOTES1/CORPSERVER'; #your server name here # my $db_path = 'mail\ltcrepor.nsf'; #your mail database here # my $pw = 'LTCREPORTS'; #your password here my $db_path = 'mail\dbase.nsf'; #your mail database here my $pw = 'password'; #your password here my $Notes = Win32::OLE->new('Lotus.NotesSession') or die "Can't get NotesSession object.\n"; $Notes->Initialize($pw); my ($Version) = ($Notes->{NotesVersion} =~ /\s*(.*\S)\s*$/); my $User = $Notes->{UserName}; my $Platform = $Notes->{Platform}; my $Database = $Notes->GetDatabase($servername,$db_path) or die "Cannot access database"; my $Document = $Database->CreateDocument; $Document->AppendItemValue ("Form", "Memo"); # ***MULTIPLE RECIPIENTS SHOULD BE AN ARRAY OF STRING ELEMENTS*** my @recipients = ('cat@hat.com', 'rush@gasbag.org'); print @recipients; $Document->AppendItemValue ("SendTo", @recipients); $Document->AppendItemValue ("Subject", "Lotus Notes email from Perl sc +ript"); my $Filename = "C:\\OLEnotes.txt"; my $Body = $Document->CreateRichtextItem('Body'); $Body->AppendText(<<"EOT"); This here is the body text of the email. Kind regards, Mary EOT $Body->EmbedObject (1454, "", $Filename, "Attachment"); $Document->Send(0);
Referring to THIS LINK, multiple recipients must be in an array of string elements. How can I accomplish this in Perl? Humbly yours, BukharikWin32::OLE(0.1403) error 0x8002000e: "Invalid number of parameters" in METHOD/PROPERTYGET "AppendItemValue" at this_sends_lotus_email. +pl line 30 OLE exception from "NotesDocument": No recipient list for Send operation Win32::OLE(0.1403) error 0x80041048 in METHOD/PROPERTYGET "Send" at this_sends_lotus_email.pl line 54
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Lotus Email: Multiple Recipients
by robobunny (Friar) on Jun 12, 2002 at 19:45 UTC | |
by Bukharik (Initiate) on Jun 12, 2002 at 19:54 UTC |