阅读Lotus Notes&使用Interop.Domino.dll的Domino邮箱 [英] Reading Lotus Notes & Domino Mailbox using Interop.Domino.dll

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

问题描述

我想使用C#和Interop.Domino.dll从Domino的邮件"文件夹填充邮箱列表.

I would like to populate the list of mailboxes from "Mail" folder of Domino using C# and Interop.Domino.dll.

我可以连接到Notes数据库并访问所有nsf文件,但是如何仅访问邮件文件夹中的nsf文件?

I can connect to the Notes database and access all nsf files, but how can I access only the nsf files in the Mail Folder?

我正在使用以下代码:

                while (_localDatabase != null)
                {

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

请给我建议一些链接或示例代码,这将使我的工作更简单. 我正在使用Domino Server 8.5.

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

推荐答案

要仅返回特定文件夹中的数据库,您必须自己做一些过滤工作.我已经通过几种方式做到了.一种方法是使用数据库的FilePath属性,然后检查路径是否在邮件文件夹下面.另一种方法是检查数据库的模板.如果您将所有邮件文件都设置为一个特定的数据库模板,并且没有有害的数据库使用该模板,则工作量会减少.

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&amp;使用Interop.Domino.dll的Domino邮箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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