我无法访问 IIS 开发服务器——只有生产服务器。因此,对于我的开发,我必须使用 Visual Studio 中内置的 ASP.NET 开发服务器。Failure to send message
当我以这种方式配置 SMTP 客户端时,我得到了。
SmtpClient.Host = "localhost";
SmtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;
SmtpClient.PickupDirectoryLocation = HttpContext.Current.Server.MapPath("~/MessagesSent/");
有什么方法可以使用开发服务器来发送消息以便我可以测试它们?
编辑:或者还有其他方法可以测试在开发服务器上发送电子邮件吗?