我正在 asp.net 中制作 Outlook 日历约会应用程序。这段代码工作正常。但是我想在约会中设置组织者名称,这在电子邮件中不起作用。我附上了我的电子邮件截图。请帮我解决这个问题。 请参阅图像中的组织者名称未知
System.Text.StringBuilder sbICSFile =
new System.Text.StringBuilder();
DateTime dtNow = DateTime.Now;
sbICSFile.AppendLine("BEGIN:VTIMEZONE");
sbICSFile.AppendLine("TZID:US/Pacific");
sbICSFile.AppendLine("BEGIN:STANDARD");
sbICSFile.AppendLine("DTSTART:20071104T020000");
sbICSFile.AppendLine("RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11");
sbICSFile.AppendLine("TZOFFSETFROM:-0700");
sbICSFile.AppendLine("TZOFFSETTO:-0800");
sbICSFile.AppendLine("TZNAME:PST");
sbICSFile.AppendLine("END:STANDARD");
sbICSFile.AppendLine("BEGIN:DAYLIGHT");
sbICSFile.AppendLine("DTSTART:20070311T020000");
sbICSFile.AppendLine("RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3");
sbICSFile.AppendLine("TZOFFSETFROM:-0800");
sbICSFile.AppendLine("TZOFFSETTO:-0700");
sbICSFile.AppendLine("TZNAME:PDT");
sbICSFile.AppendLine("END:DAYLIGHT");
sbICSFile.AppendLine("END:VTIMEZONE");
// Define the event.
sbICSFile.AppendLine("BEGIN:VEVENT");
sbICSFile.Append("DTSTART;TZID=" + ddlStartTZ.Text + ":");
sbICSFile.Append(calStartDate.SelectedDate.Year.ToString());
sbICSFile.Append(
FormatDateTimeValue(calStartDate.SelectedDate.Month));
sbICSFile.Append(
FormatDateTimeValue(calStartDate.SelectedDate.Day) + "T");
sbICSFile.AppendLine(ddlStartTime.SelectedValue);
sbICSFile.Append("DTEND;TZID=" + ddlEndTZ.Text + ":");
sbICSFile.Append(calEndDate.SelectedDate.Year);
sbICSFile.Append(
FormatDateTimeValue(calEndDate.SelectedDate.Month));
sbICSFile.Append(
FormatDateTimeValue(calEndDate.SelectedDate.Day) + "T");
sbICSFile.AppendLine(ddlEndTime.SelectedValue);
sbICSFile.AppendLine(string.Format("ORGANIZER;CN=\"rashid abbas\":MAILTO: rashidabbas7864@gmail.com"));
sbICSFile.AppendLine("SUMMARY:" + txtEventSummary.Text);
sbICSFile.AppendLine("DESCRIPTION:" + txtEventDescription.Text);
// sbICSFile.AppendLine(string.Format("ORGANIZER:MAILTO:{0}", objApptEmail.Name));
sbICSFile.AppendLine("UID:1");
sbICSFile.AppendLine("SEQUENCE:0");
sbICSFile.Append("DTSTAMP:" + dtNow.Year.ToString());
sbICSFile.Append(FormatDateTimeValue(dtNow.Month));
sbICSFile.Append(FormatDateTimeValue(dtNow.Day) + "T");
sbICSFile.Append(FormatDateTimeValue(dtNow.Hour));
sbICSFile.AppendLine(FormatDateTimeValue(dtNow.Minute) + "00");
sbICSFile.AppendLine("END:VEVENT");
sbICSFile.AppendLine("END:VCALENDAR");