Win32-OLE
view release on metacpan or search on metacpan
SQL
$Recordset->Update($Fields, $Values);
}
$Recordset->Close;
$Connection->Close;
############################################################
print "Start Notes and send email\n";
sub EMBED_ATTACHMENT {1454;}
my $Notes = Win32::OLE->new('Notes.NotesSession');
my $Database = $Notes->GetDatabase('', '');
$Database->OpenMail;
my $Document = $Database->CreateDocument;
$Document->{Form} = 'Memo';
$Document->{SendTo} = ['Jon Orwant <orwant@media.mit.edu>',
'Jan Dubois <jan.dubois@ibm.net>'];
$Document->{Subject} = "US T-Bonds Chart for $Day";
\tOpen\t$Open
\tHigh\t$High
\tLow\t$Low
\tClose\t$Close
Kind regards,
Mary
EOT
$Body->EmbedObject(EMBED_ATTACHMENT, '', $Filename);
#$Document->Send(0);
$Document->Save(0,0);
print "Done\n";
lib/Win32/OLE/TPJ.pod view on Meta::CPAN
playing around with LotusScript.) The actual task is quite simple: A
Notes session must be started, the mail database must be opened and
the mail message must be created. The body of the message is created
as a rich text field, which lets her mix formatted text with object
attachments.
In her program, Mary extracts the email addresses from her customer
database and sends separate message to each. Here, we've simplified it
somewhat.
sub EMBED_ATTACHMENT {1454;} # from LotusScript
my $Notes = Win32::OLE->new('Notes.NotesSession');
my $Database = $Notes->GetDatabase('', '');
$Database->OpenMail;
my $Document = $Database->CreateDocument;
$Document->{Form} = 'Memo';
$Document->{SendTo} = ['Jon Orwant >orwant@tpj.com>',
'Jan Dubois >jan.dubois@ibm.net>'];
$Document->{Subject} = "US T-Bonds Chart for $Day";
lib/Win32/OLE/TPJ.pod view on Meta::CPAN
\tOpen\t$Open
\tHigh\t$High
\tLow\t$Low
\tClose\t$Close
Kind regards,
Mary
EOT
$Body->EmbedObject(EMBED_ATTACHMENT, '', $Filename);
$Document->Send(0);
=head1 VARIANTS
In this final section, I'll talk about Variants, which are the data
types that you use to talk to OLE objects. We talked about this line
earlier:
my $Values = [Variant(VT_DATE, $Day),
( run in 1.659 second using v1.01-cache-2.11-cpan-2c0d6866c4f )