阅读的Lotus Notes&安培;多米诺Mailboxe使用Interop.Domino.dll [英] Reading Lotus Notes & Domino Mailboxe using Interop.Domino.dll

查看:434
本文介绍了阅读的Lotus Notes&安培;多米诺Mailboxe使用Interop.Domino.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想填充使用上述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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆