Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Lotus Notes E-mail Help

by Calculator (Initiate)
on Aug 01, 2016 at 10:25 UTC ( [id://1168909]=perlquestion: print w/replies, xml ) Need Help??

Calculator has asked for the wisdom of the Perl Monks concerning the following question:

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.

Replies are listed 'Best First'.
Re: Lotus Notes E-mail Help
by LanX (Saint) on Aug 01, 2016 at 10:34 UTC
    From my memories:

    IIRC there is no Perl API just a windows OLE interface.

    You have to look for Lotus Script demos and documentation (they use the same method calls) and translate them to Perl.

    Lotus Script intentionally looks like Visual Basic (Script?), can't tell if there are real differences, but for translation that's irrelevant.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1168909]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found