美文网首页
Lotus Notes接口

Lotus Notes接口

作者: 前端混合开发 | 来源:发表于2021-09-14 09:25 被阅读0次
    public Boolean ReadMail()
            {
                var session = new NotesSession();
                session.Initialize("aq1sw2de");
                var db = session.GetDatabase("", "c:\\notes\\data\\names.nsf", false);
                if (db == null) throw new ArgumentNullException("cannot load database");
                var collection = db.CreateNoteCollection(false);
    
    
                collection.SelectScriptLibraries = true;
                collection.BuildCollection();
    
    
                var dxlExporter = session.CreateDXLExporter();
                dxlExporter.OutputDOCTYPE = false;
    
    
                var noteId = collection.GetFirstNoteId();
                while (noteId != null)
                {
                    var doc = db.GetDocumentByID(noteId);
                    var xml = dxlExporter.Export(doc);
                    String Subject = ((object[])doc.GetItemValue("Subject"))[0] as String;
                    MessageBox.Show(Subject);
                    //do something with DXL
                    noteId = collection.GetNextNoteId(noteId);
                }
                return true;
            }
    

    相关文章

      网友评论

          本文标题:Lotus Notes接口

          本文链接:https://www.haomeiwen.com/subject/zccdcqtx.html