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
网友评论