예제 #1
0
        public ActionResult ReSendMail(int id)
        {
            SendMailLog sInfo = VideoServiceClass.SendMailLog_SelectById(id);

            SentMail.SentMail sm = new SentMail.SentMail();
            sm.Init("*****@*****.**", "账号激活", sInfo.Email, sInfo.SendContent, true);
            string error;
            sm.SentNetMail(out error);

            sInfo.Remark = error;
            sInfo.SendTime = DateTime.Now;

            int result = VideoServiceClass.SendMailLog_UpdateById(sInfo);

            if (result > 0)
            {
                return Json(new { success = true, errors = new { text = "删除成功" } });
            }
            else
            {
                return Json(new { success = false, errors = new { text = "删除失败" } });
            }
        }