2024年5月1日发(作者:)
方法一:调用OUTLOOK API发送会议邮件
添加ddi引用:
Model实体类:
using System;
using ;
namespace
{
public class AppointmentModel
{
public int ObjectId { get; set; }
///
/// Gets or sets 必选人.
///
public string[] RequiredRecipients { get; set; }
///
/// Gets or sets 可选参与者.
///
public string[] OptionalRecipients { get; set; }
///
/// Gets or sets 主题.
///
public string Subject { get; set; }
///
/// Gets or sets 会议议题(内容).
///
public string Body { get; set; }
///
/// Gets or sets 会议地点.
///
public string Location { get; set; }
///
/// Gets or sets 会议开始时间.
///
public DateTime StartTime { get; set; }
///
/// Gets or sets 结束时间.
///
public DateTime EndTime { get; set; }
///
/// Gets or sets 会议发起人.
///
public string Organizer { get; set; }
}
}
调用方法类
using System;
using ;
using uration;
using ;
using ty;
using ;
using ntrols;
using trols;
using ts;
using k;
namespace
{
///
/// 会议邀请管理
///
public class AppointmentManager
{
private AppointmentModel model;
///
/// 构造函数
///
public AppointmentManager(AppointmentModel model)
{
= model;
}
///
/// send appoint.
///
public void SendAppoint()
{
try
{
var oApp = new ApplicationClass();
// 会议是约会的一种
AppointmentItem oItem = (AppointmentItem)Item(intmentItem);
gStatus = ing;
// 会议主题
t = t;
// 会议内容
= ;
// 会议地点
on = on;
// 会议开始时间
= ime;
// 会议结束时间
= e;
// 发件人的帐号信息(索引从1开始,而不是从0)
ingAccount = ts[1];
// 提醒设置
发布评论