Search code examples
c#emaillotus

Get Lotus Notes specific MailFile


There are two MailAccount in a Lotus Notes Windows, but I want to get specific MailAccount which has MailFile(ex.mail\Molly.nsf) information. I Check C:\Notes\Notes.int but just found One nsf file.

How can I find another nsf then I can get its database?

NotesDatabase ndb = ns.GetDatabase(mailServer, mailFile);

Thank you for providing any requested information.


Solution

  • The *.nsf is the database(eg mail/molly.nsf). Typically on your mailserver there will be a "\Mail\" directory that contains all of your users mail files. Search this directory first to determine which mail files you need to get and then use your NotesDatabase ndb = ns.GetDatabase(mailServer, mailFile); where mailServer is the name of the server and mailFile is the path(usually mail\johndoe.nsf) if you have a "\Mail\" directory. If it is in the root(\Notes\ directory) you do not need to list a path.

    If however you are looking for a local mail file you will need to check "\Notes\Data\" directory usually unless the user saved the file to a different location manually.

    In addition I would check *.isOpen first to verify that you have a handle on the db.