Search code examples
c#lotus-noteslotus-domino

Lotus Notes Sending email with options


I'm using Lotus Domino.dll. Already finished sending. How set delivery options to DeliveryPriority=H and DeliveryReport=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);

Solution

  • Add the lines

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

    after your Subject line.

    You can find a complete list of mail options here.