在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
C# 发送邮件代码 1 MailMessage mailMsg = new MailMessage(); //using System.Net; 引用 2 mailMsg.From = new MailAddress("[email protected]", "lichunfang");//发件邮箱 3 mailMsg.To.Add(new MailAddress("[email protected]", "lichunfang"));//收件邮箱 4 mailMsg.Subject = "Hello ..."; //主题 5 mailMsg.Body = "ni hao ,,,,,";//.内容 6 SmtpClient client = new SmtpClient("smtp.163.com"); //smtp.126.com smtp.qq.com 7 client.Credentials = new NetworkCredential("lcfhn168", "");//用户名,密码 8 client.Send(mailMsg);
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论