I would like to know if there is any particular property on a database that I should check to see if the database is a mail database using Notes C API. One way of doing is to check for the template name but if user comes out with his own template then it becomes difficult to find if the database is a mail database.
Subject: How to find all mail databases on a particular partition
There is no “IsMail” property of a database, no. You can look at the Domino Directory ($Users) view, though, to see if the database appears in the MailFile column. Any database that has been designated as a mail-in database, including user mail files, will be listed there.
Subject: How to find all mail databases on a particular partition
Put this in an agent and run it. Then check the file on your c drive called “mymaildbs.txt”
Sub Initialize
Dim dbdir As New NotesDbDirectory( Inputbox$("Which Server?"))
file1 = "c:\mymaildbs.txt"
Open file1 For Output As 1
Set db = dbdir.GetFirstDatabase(DATABASE)
While Not(db Is Nothing)
If Left$(db.filepath, 5) = "mail\" Then
Print #1, db.title & " " & db.filename
End If
Set db = dbdir.GetNextDatabase
Wend
errhand:
If Erl() <> 0 Then
Print "Got error " & Error$ & " on line " & Cstr(Erl)
Resume Next
End If
End Sub
Subject: RE: How to find all mail databases on a particular partition
Did anyone have tried this code to find the mail databases?
What I got when I run this code, is a list of databases but the mail databases are not included.