1.确保邮箱开了SMTP服务.
例如:从163邮箱发送到QQ邮箱
配置163邮箱
设置授权密码
2.代码
WebMail.SmtpServer = "smtp.163.com"; WebMail.SmtpPort = 25; WebMail.EnableSsl = true; WebMail.UserName = "123456@163.com"; WebMail.Password = "授权密码"; WebMail.From = "123456@163.com"; WebMail.Send("123456@qq.com", "标题", "内容");