适合小白的Demo_easyui+core3第三章通用类和方法

网友投稿 582 2022-09-16

适合小白的Demo_easyui+core3第三章通用类和方法

适合小白的Demo_easyui+core3第三章通用类和方法

1、发送邮件类,百度一大堆,这里用的也是直接百度拿过来的

public static bool get_send_email(email email, string Title, string Body) {

  MailMessage mailMsg = new MailMessage();

  mailMsg.From = new MailAddress(email.sendmail, email.sendname);

  mailMsg.To.Add(new MailAddress(email.acceptmail));

  mailMsg.Subject = Title;

  mailMsg.Body = Body;

  SmtpClient client = new SmtpClient();

  client.Host = "smtp.qq.com";

  client.Port = 587;

  client.EnableSsl = true;

  client.Credentials = new NetworkCredential(email.sendmail, email.token);

try {

  client.Send(mailMsg);

}

catch ( SmtpException ex ) {

return false;

}

return true;

}

添加引用web/h_r.sys引用service/h_r.base、service/data/h_r.efdata、common/h_r.common

不存在分层,只看做是一个demo即可。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Windows PR提权
下一篇:《OpenWrt开发笔记》第9章 开发板和Windows、Ubuntu互传文件
相关文章

 发表评论

暂时没有评论,来抢沙发吧~