send appointment invitation to lotus notes 8.5 clients via c#

半世苍凉 提交于 2019-12-07 12:01:25

问题


i am using Interop.Domino.dll and able to send mail via c# code to lotus notes 8.5 users. now i want to send appointment invations to users via c# code.

here is my code.

   oNotesDocument.ReplaceItemValue("Form", "Appointment");

                oNotesDocument.ReplaceItemValue("AppointmentType", "3");  //  meeting



                oNotesDocument.ReplaceItemValue("Subject", "Deneme Toplantı");
                oNotesDocument.ReplaceItemValue("CALENDARDATETIME", StartDate);
                oNotesDocument.ReplaceItemValue("StartDateTime", StartDate);
                oNotesDocument.ReplaceItemValue("EndDateTime", EndDate);
                oNotesDocument.ReplaceItemValue("StartDate", StartDate);

                //oNotesDocument.ReplaceItemValue("MeetingType", "1");
                oNotesDocument.ReplaceItemValue("Required", "xx\\xx.xx");


                oNotesDocument.ReplaceItemValue("SendTo", "xx@xx.com");
                oNotesDocument.ReplaceItemValue("From", "xx@xx.com");
                oNotesDocument.ReplaceItemValue("Principal", "pr.incipal");
                oNotesDocument.ReplaceItemValue("Chair", "erdem.tomus"); 
                oNotesDocument.ReplaceItemValue("Location", "location test");


                oNotesDocument.ReplaceItemValue("Body", an invitation");
                oNotesDocument.ComputeWithForm(true, false);

                oItemValue = oNotesDocument.GetItemValue("SendTo");
                //Send the email
                oNotesDocument.Send(false, ref oItemValue);

i am able to send invitation but i wasn'T able to fill the attendees on who part of a lotus notes appointment form. will appreciate help on this. Infact i need ReplaceItemValue on who property but it didn't work like that. Thanks


回答1:


The "EnterSendTo" field is used when the appointment form is open to let the user enter the attendees for the meeting. I believe that gets translated to the "RequiredAttendees" item on the document once the meeting is sent.

From your code you could try:

oNotesDocument.ReplaceItemValue("EnterSendTo", "xx@xx.com");

Put that before the call to ComputeWithForm and it should work. Otherwise, try replacing the value of the RequiredAttendees item and see if that works.

Alternatively, you could send calendar entries using the iCal format. A quick search on SO led me to this question: Creating iCal Files in c#. It appears there is a decent C# class library you could use to generate iCal files, and Domino mail should recognize them.



来源:https://stackoverflow.com/questions/3362497/send-appointment-invitation-to-lotus-notes-8-5-clients-via-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!