Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

In reply to Lotus Notes E-mail Help by Calculator

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-16 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found