How do i setup a Database to email a certain person when the database is opened?
Subject: Email notifacation when a database is open
You could do this in the PostOpen event in the database script section as long as the database is being accessed via the client and not the web.
dim session as new notessession
dim db as notesdatabase
dim memo as notesdocument
dim rtitem as notesrichtextitem
set db = session.currentdatabase
set memo = db.createdocument
memo.Form = “Memo”
memo.SendTo = “emailaddress”
memo.Subject = “whatever”
set rtitem - new notesrichtextitem(memo, “Body”)
call rtitem.appendtext(session.CommonUsername + " has just opened the database")
Call memo.send(false)
Subject: RE: Email notifacation when a database is open
Thanks. i’ll try it out.
Subject: RE: Email notifacation when a database is open
I was able to get this to work on the default outline view. Where is the “database script section” that you are talking about? right now every time to view is open it sends an email.
Subject: RE: Email notifacation when a database is open
In designer it is under the Other section in release 6.
Subject: RE: Email notifacation when a database is open
Nice… Thank you much.
Subject: Email notifacation when a database is open
why not have a welcome screen which always opens, and a button to open the default view, in the button you could have a formula to send a mail, then go to required vies.