我使用Lotus Notes從C#發送郵件,但發送的郵件不在數據庫中,並且無法在輸出文件夾中看到。C#Lotus Notes - 發送郵件不在
我的代碼是:
_notesSession = new NotesSession();
string sPassword = "";
_notesSession.Initialize(sPassword);
string sServer = "";
string sFile = "data\mailfilename.nsf";
_notesDataBase=_notesSession.GetDatabase(sServer, sFile, false);
// not: _notesDataBase=_notesSession(GetDatabase(sServer, sFile, false));
if (!_notesDataBase.IsOpen) _notesDataBase.Open();
_notesDocument = _notesDataBase.CreateDocument();
_notesDocument.SaveMessageOnSend = true;
.
.
.
_notesDocument.Save(true,false);
_ItemValue = _notesDocument.GetItemValue("SendTo");
_notesDocument.Send(false, ref _ItemValue);
如果我發送郵件,我看到CreateDocument()後,出現以下錯誤信息之前檢查_notesDocument的價值:
FolderReferences =「((Domino.NotesDocumentClass )(_noteDocument))。FolderReferences「hat eine Ausnahme vom Typ」System.Runtime.InteropServices.COMException「verursacht。 (...已經引起同類型的...除外) 基地{} System.Runtime.InteropServices.ExternalException =
順便說一句我也試圖取代{「文件夾引用未在數據庫上啓用」}具有完全限定路徑(c:... nsf)的sFile,但結果相同。
任何人都可以給我一個提示,怎麼做才能將郵件保存在輸出文件夾中?
我不知道你的配置看起來像什麼,但通常「數據」是根Lotus Notes數據庫的文件樹,它不會被包含在一個相對的文件路徑中,所以只包含「data \ mailfilename.nsf」,它只是「mailfilename.nsf」,或者可能是「mail \ filename.nsf」 。 – 2013-03-08 15:35:38
另外,你是什麼意思的「輸出文件夾」。在Lotus Notes中發送郵件的正常位置是已發送視圖。 (視圖與文件夾不同。) – 2013-03-08 15:36:59