static void Main(string[] args) { string mailAddress_from="yftan@chinchool.net"; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("smtp.chinool.net", 25); client.Credentials = new System.Net.NetworkCredential(mailAddress_from, ""); try { client.Send(mailAddress_from, "14816898@qq.com", "test2", "hello world"); Console.WriteLine("邮件发送完毕"); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine("失败!"); } Console.Read(); }