Lotus Notes使用选项发送电子邮件

时间:2014-01-30 05:59:04

标签: c# lotus-notes lotus-domino

我正在使用Lotus Domino.dll。已经完成发送。如何将投放选项设置为DeliveryPriority=HDeliveryReport=C? CODE

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);

1 个答案:

答案 0 :(得分:6)

添加行

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

在主题行之后。

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