MailAddress from = new MailAddress("******@163.com");
MailAddress to = new MailAddress("******@163.com");
MailMessage message = new MailMessage(from, to);
message.Subject ="测试一下";
message.Body = "测试一下";
IPAddress[] address= Dns.GetHostAddresses(Dns.GetHostName());
SmtpClient client = new SmtpClient(IPAddress.Loopback.ToString());
client.Send(message);//由于目标计算机积极拒绝,无法连接。 127.0.0.1:25
Console.WriteLine("发送成功");
总是发生"由于目标计算机积极拒绝,无法连接。 127.0.0.1:25"错误,该怎么处理??求大神指教