我正在尝试通过我们公司的Exchange服务器从c#代码发送电子邮件。
System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("exchangebox1.mycompany.com");
System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage("Me@myCompany.com",
"Them@mycompany.com",
"title here",
"body here");
client.Send(msg);
当我运行代码时,出现了SmptException异常,显示“服务不可用,关闭传输通道。服务器响应为4.3.2 服务不可用,关闭传输通道。”我理解这意味着我们的交换机上未启用SMTP,并且我需要使用本机Exchange Server命令发送邮件。我的理解正确吗?或者SMTP是否总是可用?
此外,交换服务器是否可能被配置为只允许特定的计算机/用户通过SMTP发送邮件?
如何在不使用SMTP的情况下通过Exchange Server发送电子邮件?
谢谢。