MailMessage mailmessage = new MailMessage(account, toAddress, title, body);
//from email,to email,主题,邮件内容
mailmessage.IsBodyHtml = true;
mailmessage.Priority = MailPriority.Normal; //邮件优先级
System.Net.Mail.SmtpClient smtpClient = new System.Net.Mail.SmtpClient("smtp.qq.com", 25); //smtp地址以及端口号
smtpClient.Credentials = new NetworkCredential(account, password);//smtp用户名密码
smtpClient.Send(mailmessage); //发送邮件
smtpClient.Dispose();
mailmessage.Dispose();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货