通过c#向Lotus Notes 8.5客户端发送预约邀请
我正在使用 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", "[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);
我可以发送邀请,但无法在 Lotus Notes 预约表的哪一部分填写与会者。将不胜感激对此的帮助。 事实上,我需要对 who 属性进行 ReplaceItemValue,但它并没有那样工作。 谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当约会表单打开时,使用“EnterSendTo”字段让用户输入会议的与会者。我相信一旦会议发送,就会被翻译为文档中的“RequiredAttendees”项目。
从您的代码中,您可以尝试:
将其放在调用 ComputeWithForm 之前,它应该可以工作。否则,请尝试替换RequiredAttendees项的值并查看是否有效。
或者,您可以使用 iCal 格式发送日历条目。对 SO 的快速搜索让我想到了这个问题:Creating iCal Files in c#。看来有一个不错的 C# 类库可以用来生成 iCal 文件,并且 Domino 邮件应该可以识别它们。
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:
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.