Allt om Lotus Notes & Domino

Add email snooze to your IBM Notes Mail
The mailbox app in appstore have a really nice feature, it let's you snooze your email for a custom time and bring it back as a new mail when the time is reached.
This is some sceeenshots of the app

So I did a quick test to see if I could do something similar in IBM Notes mail, and this is what I came up with

In my solution I created the following in my mail file.

- One subform to be used as the snooze dialog
- One manually triggered agent to be used in the inbox view to snooze messages
- One scheduled agent that bring the snoozed email back to the inbox

This is the subform

This is what it looks like when I snooze the selected messages in my inbox
When snoozing for "days" I set the time to 08:00 so I recieve them just in time to plan my day

This is the agent I use to snooze selected emails (triggered from the inbox actionbar)

Sub Initialize

' Run this agent on selected emails in inbox
' Prompt user for when to recieve a reminder and move the email to the snooze folder

On Error GoTo e
Dim ws As New NotesUIWorkspace,i As Long, choice As Variant
Dim session As New NotesSession, db As NotesDatabase, doc As NotesDocument, dc As NotesDocumentCollection
Dim item As NotesItem,tmpdoc As NotesDocument, tm As String, dtx As notesdatetime
Dim dt As New NotesDateTime("today")
Set db = session.currentdatabase
Set dc = db.Unprocesseddocuments
Set tmpdoc = db.createdocument

' Prompt user when to return the selected emails to inbox
choice = ws.Dialogbox("RemindMe", True,true, false, false, false, false, "Remind me in",tmpdoc , true, false,true)

If choice Then
tm = tmpdoc.RemindMe(0)
Call dt.setNow()
If InStr(tm,"h") Then
Print "Remind me in " + tm
Call dt.Adjusthour(CInt(Left(tm,1)))
Print "Remind me in " + tm + " days"
Call dt.Adjustday(CInt(tmpdoc.RemindMe(0)))
Set dt = New NotesDateTime(dt.DateOnly + " 08:00:00")

End If

' Loop all selected and move them to the snoozes folder
For i = 1 To dc.count
Set doc = dc.getNthdocument(i)

' Update the email with reminder date time
Set item = doc.getFirstItem("RemindMeAt")
If item Is Nothing Then
Set item = New NotesItem(doc ,"RemindMeAt",dt)
Set item.Values = dt
End If

Call doc.Removefromfolder("($Inbox)")
Call doc.Putinfolder("Snoozes",true)
End If

Exit Sub
Print Error,erl
End Sub

This is the scheduled agent used to bring back snoozed emails to your inbox
I have set this agent to run every 30 minutes

Sub Initialize

On Error GoTo e

Dim session As New NotesSession, db As NotesDatabase, doc As NotesDocument, nvec As notesviewentrycollection
Dim i As Long, choice As Variant, view As NotesView,dt2 As NotesDateTime, c As Long
Dim item As NotesItem

Set db = session.currentdatabase
Set view = db.getView("Snoozes")
view.Autoupdate = false
If view Is Nothing Then Exit sub
Set nvec = view.allentries
Dim dt1 As New NotesDateTime("Today")
Call dt1.Setnow()

' Loop all emails in snoozes folder and find out if it is time to move it back to inbox
For i = 1 To nvec.count
Set doc = nvec.getNthentry(i).document
Set item = doc.getFirstItem("RemindMeAt")
Set dt2 = item.Datetimevalue
If dt2.Timedifference(dt1) < 0 Then

' Change the delivery date so it is add to top
doc.DeliveredDate = Now
doc.Importance = "1"
doc.Subject = "Reminder: " + doc.Subject(0)
Call doc.Removefromfolder("Snoozes")
Call doc.Putinfolder("($Inbox)",true)
Call doc.Markunread()
c = c + 1
End If

Print "Moved " + CStr(c) + " mail to inbox"
Exit Sub
Print Error,erl
End Sub

- Both the delivery time and the subject is updated when the email is moved back to the inbox. this might cause some confustion if the reminded email is replied or if you want to see when the email was initially recieved.

- The time for returning the messages is not exact as the agent is scheduled, the more often the agent runs the more exact the messages are returned.

- You cannot snooze messages using this technique using Webmail or Mobile devices but when the messages are returned to the inbox they will show up as new email in all mail clients

Relevanta Poster på Notessidan:

Fler Poster om:

Fler bloggar om:


Publicerad 2014-04-14 | Kommentarer: 3 | Läsningar:


Patrick Kwinten ( 2014-04-14 09:15:32 )

Palmi ( 2014-04-14 10:41:16 )

Mosharraf ( 2018-01-20 06:07:18 )

Sök på Notessidan
Thomas Adrian
ThomasCertifierad utvecklare och administratör inom Notes & Domino

Kontakta mig

Senaste Sökningarna på Notessidan
Sön - sharepoint (R:1)
Sön - räkna and antal and besökare (R:0)
Sön - browser (R:17)
Sön - stoppar and mail (R:1)
Sön - korrupt (R:3)
Sön - böcker (R:0)
Sön - kalendern (R:12)
Sön - feature (R:15)
Sön - print and mime (R:2)
Sön - länka (R:0)
Sön - databasen (R:94)
Sön - access (R:47)
Sön - outlook (R:15)
Sön - webanvändare (R:0)
Sön - google and maps (R:6)
Sön - juffe (R:2)
Sön - uidoc.print (R:1)
Sön - java and lotusscript (R:26)
Sön - besök (R:0)

Databasstatistik Blogg
Uppdateras var 15:e Minut

Antal Poster:562
Antal Kommentarer: 1449
Alla sidvisningar idag:
Unika Besökare idag:
Databasstorlek: 142,25Mb
Fixup: 2020-03-30 00:31:05
FT:2020-03-31 12:58:52
DB Procent använd: 99,7
Antal Agenter: 42
Antal Formulär: 65
Antal Vyer: 60
Antal Dokument: 8133
Antal Image Resources: 108
Antal Subformulär: 18
Antal Scriptbibliotek: 11
Totalt Antal Designelement: 576
Antal Attachments: 158
Antal Konflikter: 0
Server version 1: 405
Server version 2: Release 9.0.1FP9|August 14, 2017
Server Plattform: Windows/64
Ändrad: 2020-03-31 16:26:52
Server Tidszon: Z=-1$DO=1$DL=3 -1 1 10 -1 1$ZX=131$ZN=W. Europe
Kommentarsspam Idag: 1
Kommentarsspam Totalt: 20853

Top Sites at

Fight Spam! Click Here!

Listed on BlogShares

Increase website traffic

Top Internet Blogs

Site Checker