我收到以下错误:
Failure sending mail
和内部异常是
Unable to connect to the remote server
在C#中
MailMessage mail = new MailMessage("you@yourcompany.com", "user@hotmail.com","Newsletter", "This is a test mail");
SmtpClient client = new SmtpClient("localhost");
client.Send(mail);
这是我在IIS 7中的本地smtp电子邮件设置。
还安装了smtp服务器工具