我使用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