我想填充使用上述API(Interop.Domino.dll)从C#的Domino的邮件文件夹中的邮箱列表。 我无法连接到Notes没有问题,访问database.It很容易访问所有NSF文件,但我想访问邮件文件夹,即邮件文件也只是NSF文件。
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.
我使用下面的代码:
while (_localDatabase != null) { dbString = _localDatabase.Title; TreeNode objRootNode = new TreeNode(dbString); objForm.tvwExchDomain.Nodes.Add(objRootNode); dbCount = dbCount + 1; _localDatabase = dir.GetNextDatabase(); }
请建议我一些链接或示例代码,这将使我的工作更简单。 我使用Domino服务器8.5。
Kindly suggest me some links or sample code which will make my work simpler. I am using Domino Server 8.5.
推荐答案要从一个特定的文件夹中只返回数据库,你就会有做一些筛选的自己。我做这几种方法。一种方法是使用数据库的文件路径属性,然后检查是否该路径是邮件文件夹下。另一种方法是检查数据库的模板。 ,这是一个工作位少,提供的所有邮件文件被设置为一个特定的数据库模板,没有多余的数据库使用该模板
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.
第一种方法:
If _localDatabase.IsOpen Then If Instr(1, "mail", _localDatabase.FilePath, 5) <> 0 Then 'do work here End If End If方法二:
If _localDatabase.IsOpen Then If _localDatabase.DesignTemplateName = MAIL_TEMPLATE_NAME Then 'do work here End If End If更多推荐
阅读的Lotus Notes&安培;多米诺Mailboxe使用Interop.Domino.dll
发布评论