👨‍💻Developer Tips

Tips for the HCL Notes developer implementing Squirrel for the end users


The Squirrel server add-in is written entirely in Java which includes the open source Java framework JAddin (for HCL Domino server add-in) and the freeware SOFA (for OAuth 2.0 authentication). The HCL Notes front-end is a pure HCL Notes application distributed in a single NTF database template..

Email Document

The original body of the Internet mail will be saved in the Notes document as a Notes MIME type item. The original MIME headers are preserved and saved in the Notes document.

Additional Notes Items

Before forwarding messages to HCL Domino, the following items are added to preserve the original fields from the Internet email message. These items may be used to process messages in the users in-box with agents or to create new views or additional columns.

Notes Delivered Time / Posted Time

Squirrel will set the Notes item PostedDate to the original date and time of the message. The Notes item DeliveredDate is set by the Domino router to the date and time when the message was actually processed by the router task (stored in the users mail database). If you want the user to see the original date and time of the message, you must change the formula of the Inbox folder column to show the PostedDate instead of the DeliveredDate.

Folder Processing

The Notes item $SquirrelFolder contains the folder name of the original message. POP3 messages always return the name of the inbox where IMAP messages will contain the full name of the folder. This item may be used in a Notes pre-delivery agent (Before new mail arrives) to add the message to the corresponding folder, e.g.

Sub Initialize
    Dim Session As New NotesSession
    Dim Document As NotesDocument
    Dim FolderName As String

    Set Document = Session.DocumentContext
    FolderName = Document.getItemValue("$SquirrelFolder")(0)

    ' Move the message to the original folder
    If ((FolderName <> "") And (UCase(FolderName) <> "INBOX")) Then
        Call Document.PutInFolder(FolderName)
        Call Document.RemoveFromFolder("($Inbox)")
    End If
End Sub

Last updated