Examples: OpenMailLog method
- This agent script opens up a mail log. When the Close method is
called, the mail memo gets sent to Thalia Ruben, with "Here's the
Linguist Log" in the Subject. Actions and errors are in the Body of
the memo.
Sub Initialize Dim currentLog As NotesLog Set currentLog = New NotesLog( "Linguist Log" ) Call currentLog.OpenMailLog _ ( "Thalia Ruben", "Here's the Linguist Log" ) '...log some actions and errors... currentLog.Close End Sub
- This agent script opens up a mail log that gets sent to the owner
of the current agent. For example, if Susanna Tallan owns the Archiving
Agent in the Project Histories database, the memo gets sent to Susanna,
with "Archiving Agent in Project Histories" in the Subject. Actions
and errors are in the Body of the memo.
Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim agent As NotesAgent Set db = session.CurrentDatabase Set agent = session.CurrentAgent Dim currentLog As NotesLog Set currentLog = New NotesLog( agent.Name ) Call currentLog.OpenMailLog _ ( agent.Owner, agent.Name & " in " & db.Title ) '...log some actions and errors... Call currentLog.Close End Sub