How do I use the feature 'Don't forward if my mailbox is open'?

NOTE: You must have Domino Designer installed and have at least Desiger-level access to your mailfile.
Alternatively, you can have your email administrator perform these steps for you.

From your mailbox in Lotus Notes, choose View \ Design to launch your mailfile in Designer.


In Designer, choose:
  • Other \ Database Resources (Notes 6/7/8)
  • Resources \ Other (Notes 5)
Select Database Script
Choose File \ Document Properties (Notes 5/6/7) or Design \ Design Properties (Notes 8).
Click the 3rd tab, and select:
  • 'Prohibit design refresh or replace to modify' (Notes 6/7/8)
  • 'Do not allow design refresh/replace to modify' (Notes 5)
Open Database Script by double-clicking on it.
Copy and paste the code below into the 2 specified events: PostOpen and QueryClose
Save and close the script

Place the following code in your mail database postopen event:

Dim s As New NotesSession
Dim db As NotesDatabase
Dim profiledoc As NotesDocument
Dim calprofile As NotesDocument
Set db = source.Database
Set calprofile = db.GetProfileDocument("CalendarProfile")
Dim cUser As New NotesName(s.UserName)
Dim Owner As New NotesName(calprofile.Owner(0))
If Lcase(cUser.Canonical) = Lcase(calprofile.Owner(0)) Then
Set profiledoc = db.GetProfileDocument("TextForwarding")
If profiledoc.SuppressWhenMailOpen(0) ="1" Then
profiledoc.NotesClientActiveSession = 1
Call profiledoc.Save(True, True)
Print "WirelessMail forwarding is temporarily disabled until you close your mailbox"
End If
End If

Place the following code in your mail database queryclose event:

Dim s As New NotesSession
Dim db As NotesDatabase
Dim profiledoc As NotesDocument
Dim calprofile As NotesDocument
Set db = source.Database
Set calprofile = db.GetProfileDocument("CalendarProfile")
Dim cUser As New NotesName(s.UserName)
Dim Owner As New NotesName(calprofile.Owner(0))
If Lcase(cUser.Canonical) = Lcase(Owner.Canonical) Then
Set profiledoc = db.GetProfileDocument("TextForwarding")
If profiledoc.SuppressWhenMailOpen(0) ="1" Then
profiledoc.NotesClientActiveSession = 0
Call profiledoc.Save(True, True)
Print "WirelessMail forwarding has resumed"
End If
End If