Reading Lotus Notes & Domino Mailboxe using Interop.Domino.dll

匿名 (未验证) 提交于 2019-12-03 02:23:02

问题:

I would like to populate the list of mailboxes from "Mail" folder of Domino from c# using the above API (Interop.Domino.dll). I have no problems connecting to Notes, accessing the database.It is easy to access all nsf files but i want to access only only nsf files in Mail Folder i.e Mail files.

I am using below code:

                while (_localDatabase != null)                 {                      dbString = _localDatabase.Title;                     TreeNode objRootNode = new TreeNode(dbString);                     objForm.tvwExchDomain.Nodes.Add(objRootNode);                      dbCount = dbCount + 1;                     _localDatabase = dir.GetNextDatabase();                    }

Kindly suggest me some links or sample code which will make my work simpler. I am using Domino Server 8.5.

回答1:

To return only databases from within a specific folder, you'll have to do some filtering work yourself. I've done this a couple of ways. One method is to use the database's FilePath property, and then check to see if the path is underneath the mail folder. The other way is to check the database's template. That is a bit less work, provided all of your mail files are set to a particular database template, and no unwanted databases use that template.

First method:

If _localDatabase.IsOpen Then     If Instr(1, "mail", _localDatabase.FilePath, 5) <> 0 Then         'do work here     End If End If

Second method:

If _localDatabase.IsOpen Then     If _localDatabase.DesignTemplateName = MAIL_TEMPLATE_NAME Then         'do work here     End If End If


回答2:

I would open the server NAB and look through all user documents in the ($Users) view. Each of these documents contain the mail file path (and server name).



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!