Hi,
I am querying the list of databases through NSFSearch with FILE_DBANY. Is there a way to get a property on each .nsf file returned to tell whether it is a user mailbox or not?
I was looking through the include files and saw a flag CHFLAG_MAILBOX_TYPE, but don’t know how to query for that flag.
== edit ==
Ok…NSFNoteOpen(NOTE_ID_SPECIAL+NOTE_CLASS_ICON) appears to be related but I don’t know which flag to pass to NSFItemGetText() to get this flag. I tried ICON_FLAGS, but that didn’t work.
I just got ‘FJnK47h’, which doesn’t have any definitive mail only flag.
==========
== edit 2 ==
ok, a hack around this is to parse its template type for string ‘mail’ but this is an ugly hack.
============
Any help appreciated.
Shane.
Subject: How to tell if databases returned with NSFSearch is a user mailbox
There is a NotesDatabase.Type flag and one of the possible types is DBTYPE_MAILFILE. Unfortunately, I don’t think that Lotus uses this. I took a look a a few mail files and noticed that they are all set to “Standard”.
However, even though there isn’t any setting, you could always do a lookup into names.nsf to see if any person documents listed that database as someone’s mail file.
Another option would be to check for a few design elements that you know exist in a mail file. ($Inbox) folder, OutOfOffice agent, etc.
I know these aren’t exactly what you are looking for, but they will probably work.
Subject: RE: How to tell if databases returned with NSFSearch is a user mailbox
You can also check the design template property, although that’s not foolproof either. If you want to know for sure whether or not the database is an actual user mail database, you’d need to look it up in the Domino Directory (names.nsf) and make sure it appears on a Person document.
Subject: RE: How to tell if databases returned with NSFSearch is a user mailbox
Great thanks…thats the info I need. I’m going to look up how to read from the Person document in the names.nsf db now. But if you have time in the meantime, could you give a pointer on how to roughly do this using the C API?
I’m new to the interface and the documentation doesn’t really give much away.
Thanks again,
Shane.
Subject: RE: How to tell if databases returned with NSFSearch is a user mailbox
I’m newer to the C API than you, I’d bet. I’d bet seriously large money on it, in fact, since you’ve got working code and I’ve just gotten the toolkit and a rather nice book, neither of which I’ve had time to look at yet. Wish I could be of more help.