使用VCALENDAR和.NET的会议请求中缺少必需的与会者 [英] Missing Required Attendees in Meeting Request using VCALENDAR and .NET

查看:98
本文介绍了使用VCALENDAR和.NET的会议请求中缺少必需的与会者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我遇到了一个真正棘手的问题,我刚刚完全陷入了困境.我必须使用VCALENDAR格式通过电子邮件向Outlook创建会议请求.我可以整天创建.ics文件,它们可以很好地用作附件,但他们希望将其作为实际的会议要求,而不是附件.

我将使用用于发送电子邮件的代码,但问题是这样的:当我通过电子邮件发送日历时,无论我做什么,都不会显示必需"或可选"参与者.要了解我的意思,请单击此处:
约会格式 [

Hey Everyone,

I have run into a real tough issue that I have just been completely stumped on. I have to create a meeting request via E-Mail to Outlook using the VCALENDAR format. I can create .ics files all day long and they work great as attachments, but they want it as an actual meeting request, not an attachment.

The code I use to send the email will follow, but the problem is this: When I send the calendar via email, no matter what I do, none of the "Required" or "Optional" attendees show. To see what I mean, click here:
Appointment Format[^]

Do any of you have any idea how to make this work?

Code:

System.Net.Mime.ContentType calendarType = new        System.Net.Mime.ContentType("text/calendar");

     //  Add parameters to the calendar header
     calendarType.Parameters.Add("method", "REQUEST");
     calendarType.Parameters.Add("name", "meeting.ics");

     MailMessage msg = new MailMessage();

     AlternateView calendarView = AlternateView.CreateAlternateViewFromString(GetVCalendar().ToString(), calendarType);
     //calendarView.TransferEncoding = TransferEncoding.SevenBit;
     msg.AlternateViews.Add(calendarView);

     msg.To.Add("some.recipient@myco.com");
     msg.From = new MailAddress("my.service@myco.com");
    // msg.Subject = "This time with Publish - still a problem";
   //  msg.Body = GetVCalendar().ToString();

     string mailServer = "extrelay.myco.com";
     SmtpClient client = new SmtpClient(mailServer);
     client.Send(msg);



这是GetVCalendar()检索到的字符串-



This is the string retrieved by GetVCalendar() --

BEGIN:VEVENT
ATTENDEE;CN="Someone Else";ROLE=OPT-PARTICIPANT;RSVP=FALSE:mailto:Some
    one.else@myco.com
CLASS:PUBLIC
CREATED:20100804T132739Z
DTEND:20100806T030101Z
DTSTAMP:20100804T132739Z
DTSTART:20100806T020101Z
LAST-MODIFIED:20100804T132739Z
LOCATION:Some Location
ORGANIZER;CN="Some Organizer":mailto:Some.Organizer@myco.com
PRIORITY:Normal
SEQUENCE:0
SUMMARY;LANGUAGE=en-us:Some Title
TRANSP:OPAQUE
UID:700cfaa62f1d4c1f9c042b2c34224bb7
X-ALT-DESC;FMTTYPE=text/html:<html><head><title>This is a title</title><
    /head><body><span style="color:Lime">This is LIME green!</span></body></
    html>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:Normal
X-MICROSOFT-DISALLOW-COUNTER:TRUE
X-MS-OLK-ALLOWEXTERNCHECK:TRUE
X-MS-OLK-APPTSEQTIME:20100804T132739Z
X-MS-OLK-AUTOFILLLOCATION:TRUE
X-MS-OLK-CONFTYPE:0
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT

推荐答案

好吧……事实证明,我们在ATTENDEE属性上缺少一个属性.有一个名为EXPECT = xxxx的属性,其中xxxx是FYI,REQUIRE,REQUEST或IMMEDIATE.

将这些添加到每个参与者后,它便可以正常工作.
Well... as it turns out, we were missing a property on the ATTENDEE property. There is a property called EXPECT=xxxx where xxxx is FYI, REQUIRE, REQUEST, or IMMEDIATE.

Once you add those to each ATTENDEE, it works perfectly.


这篇关于使用VCALENDAR和.NET的会议请求中缺少必需的与会者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆