vs asp.net 给所有邮箱发邮件,案例,源代码,c#
//发送邮箱
MailMessage mailObj = new MailMessage();
mailObj.From = new MailAddress("*****@163.com"); //发送人邮箱地址
mailObj.To.Add("¥¥¥¥¥¥¥¥@163.com"); //收件人邮箱地址
mailObj.Subject = "主题:么么么哒"; //主题
mailObj.Body = "正文:亲爱的美妞 爱你呀"; //正文
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.163.com"; //smtp服务器名称
smtp.UseDefaultCredentials = true;
smtp.Credentials = new NetworkCredential("********@163.com", "151sdfeer1515"); //发送人的登录名和密码
smtp.Send(mailObj);