我想发送回复电子邮件。我在使用EWS的微软示例中找到了这个例子。问题是我在运行这段代码时遇到了这个错误。
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
EmailMessage mes = new EmailMessage(service);
string replyto = mes.Sender.Address;
Console.WriteLine(replyto);
mes.Subject = "Notification Received";
mes.Body = "Your notification has successfully been added to the site";
mes.ToRecipients.Add(replyto);
mes.Send();
错误: 错误:您必须先加载或指定此属性,然后才能读取其值。