views:

188

answers:

1

hi there,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", "[email protected]");
                oNotesDocument.ReplaceItemValue("From", "[email protected]");
                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  A: 

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", "[email protected]");

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: http://stackoverflow.com/questions/10658/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.

Ken Pespisa