// https://www.microsoft.com/en-us/download/details.aspx?id=28952
// > msiexec /a "D:EwsManagedApi32.msi" /qb TARGETDIR="D:1" -- 解压 msi
/// <summary>
/// 发送邮件
/// </summary>
public void SendEmail()
{
string credentialUserName = "";
string credentialUserPwd = "";
string domain = "";
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
service.Credentials = new NetworkCredential(credentialUserName, credentialUserPwd, domain);
service.Url = new Uri("https://XX/ews/Exchange.asmx");
EmailMessage message = new EmailMessage(service);
message.Subject = ""; // 主题
message.Body = ""; // 内容
message.ToRecipients.Add(""); // 收件人
message.CcRecipients.Add(""); // 抄送
message.BccRecipients.Add(""); // 密送
message.Attachments.AddFileAttachment(""); // 添加附件
message.Send(); // 发送
}
本文来自:http://www.cnblogs.com/gcczhongduan/p/4025106.html