3

我正在使用 Interop.Domino.dll 并能够通过 c# 代码向 lotus notes 8.5 用户发送邮件。现在我想通过 c# 代码向用户发送约会邀请。

这是我的代码。

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

我可以发送邀请,但我无法填写 Lotus Notes 预约表中的与会者。将不胜感激这方面的帮助。事实上,我需要在 who 属性上使用 ReplaceItemValue,但它并没有那样工作。谢谢

4

1 回答 1

4

“EnterSendTo”字段在约会表单打开时使用,让用户输入会议的与会者。我相信一旦发送会议,它就会被翻译成文档上的“RequiredAttendees”项目。

从您的代码中,您可以尝试:

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

把它放在调用 ComputeWithForm 之前,它应该可以工作。否则,请尝试替换 RequiredAttendees 项的值,看看是否可行。

或者,您可以使用 iCal 格式发送日历条目。对 SO 的快速搜索让我想到了这个问题: 在 c# 中创建 iCal 文件。似乎有一个不错的 C# 类库,您可以使用它来生成 iCal 文件,Domino 邮件应该可以识别它们。

于 2010-07-29T14:37:57.963 回答