【问题标题】:Reading Lotus Notes & Domino Mailbox using Interop.Domino.dll使用 Interop.Domino.dll 读取 Lotus Notes 和 Domino 邮箱
【发布时间】:2009-08-06 11:20:55
【问题描述】:

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

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

我正在使用以下代码:

                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。

【问题讨论】:

    标签: c# lotus-notes lotus-domino interop-domino


    【解决方案1】:

    要仅返回特定文件夹中的数据库,您必须自己进行一些过滤工作。我已经通过几种方式做到了这一点。一种方法是使用数据库的 FilePath 属性,然后检查路径是否位于邮件文件夹下。另一种方法是检查数据库的模板。如果您的所有邮件文件都设置为特定的数据库模板,并且没有不需要的数据库使用该模板,那么工作量会少一些。

    第一种方法:

    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
    

    【讨论】:

    • 感谢肯。我得到了解决方案。现在我可以列出“邮件”文件夹中的所有 NSF 文件。现在下一步是列出日历,期刊,联系人,在框中,发送等
    【解决方案2】:

    我会打开服务器 NAB 并查看 ($Users) 视图中的所有用户文档。这些文档中的每一个都包含邮件文件路径(和服务器名称)。

    【讨论】:

      猜你喜欢
      • 2014-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-22
      • 1970-01-01
      相关资源
      最近更新 更多