BeginnerW
BeginnerW
2019-06-13 09:30
采纳率: 62.5%
浏览 480

QQ邮箱发送信息不成功,也不报错

using (MailMessage mailmessage = new MailMessage())
using (SmtpClient smtpclient = new SmtpClient("smtp.qq.com"))
{
//填补邮件信息
//mailmessage.To.Add("947806342@qq.com");
mailmessage.To.Add(diz);//可以有多个
mailmessage.Body = "您好"+Name+",您的密码设置为初始 密码为123456,登陆后可重新修改。";
mailmessage.From = new MailAddress("xxx@qq.com");
mailmessage.Subject = "银豪KTV";
smtpclient.Credentials = new System.Net.NetworkCredential("xxx@qq.com", "邮箱凭证");
smtpclient.Send(mailmessage);//发送

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

相关推荐