Hey there,
I am trying to generate a code, which allows me to send an E-mail via lotus Notes. I am kinda stuck with the following problems, since i donīt know the api.
If the E-mail is sent through perl it does not show in my lotus notes folder "sent".
I would also like to have the feature before sending the mail, that it would open first, so I can take a quick look at it before sending.
I am definetly not a geek when it comes to programming but this is what i got so far:
Is there a good website for Lotus Notes Perl API. I canīt seem to find what I am looking for.
use strict;
use warnings;
use Win32::OLE;
my $Notes = new Win32::OLE('Notes.NotesSession')or die "$!: cannot sta
+rt Lotus Notes Session object.\n";
# my $Database = $Notes->GetDatabase('server1', 'db1\myown.nsf');
my ($Version) = ($Notes->{NotesVersion} =~ /\s*(.*\S)\s*$/);
print "The current user is $Notes->{UserName}.\n";
print "Running Notes \"$Version\" on \"$Notes->{Platform}\".\n";
# user dependent
my $Database = $Notes->GetDatabase('', 'mail444\Calcu.nsf') or die "$!
+: could not open database.\n";
if ($Database->IsOpen)
{
print "database is open\n";
}
else
{
print "database is not open\n";
}
print "creating new document\n";
my $Document = $Database->CreateDocument('test') or die "$!: can't cre
+ate document";
if ($Document->IsNewNote)
{
print "document is new not saved\n";
}
else
{
print "document is not new\n";
}
print "populating fields\n";
$Document->{'plain_text'} = 'E-MailTestViaPerl';
$Document->{'SendTo'} = 'yourMail@test.com';
$Document->{'Body'} = 'Carpe Diem. This is a Test';
$Document->{'Subject'} = 'Is it working?';
print "saving document\n";
$Document->Save (1, 1);
$Document->GetLastDocument;
$Document->Open();
$Document->Send(0);
printf "$Document\n";
if ($Document->Send){
print "Send";
}
I hope you can help me.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.