Skip to main content
 首页 » 编程设计

c#之Lotus Notes 发送带有选项的电子邮件

2024年01月26日34oomusou

我正在使用 Lotus Domino.dll。已经发送完毕。如何将交付选项设置为 DeliveryPriority=H 和 DeliveryReport=C? 代码

NotesSession _notesSession = new NotesSession(); 
NotesDocument _notesDocument = null; 
string sMailFile = "mail/" + login + ".nsf"; 
 _notesSession.Initialize(passwrod); 
 NotesDatabase _notesDataBase = _notesSession.GetDatabase(sServerName, sMailFile, false); 
            if (!_notesDataBase.IsOpen) 
            { 
                _notesDataBase.Open(); 
            } 
            _notesDocument = _notesDataBase.CreateDocument(); 
            _notesDocument.ReplaceItemValue("Form", "Memo"); 
            _notesDocument.ReplaceItemValue("SendTo", aSendTo); 
            _notesDocument.ReplaceItemValue("Subject", aSubject); 
            NotesRichTextItem _richTextItem = _notesDocument.CreateRichTextItem("Body"); 
            _richTextItem.AppendText(text + "\r\n"); 
 _richTextItem.EmbedObject(EMBED_TYPE.EMBED_ATTACHMENT, "", file); 
 var oItemValue = _notesDocument.GetItemValue("SendTo"); 
 _notesDocument.SaveMessageOnSend = true; 
 _notesDocument.Send(false, ref oItemValue); 

请您参考如下方法:

添加行

        _notesDocument.ReplaceItemValue("DeliveryPriority", "H"); 
        _notesDocument.ReplaceItemValue("DeliveryReport", "C"); 

在您的主题行之后。

您可以找到完整的邮件选项列表 here .