示例#1
0
        public ActionResult ForgetPsw(string email)//根据用户输入发送email到用户邮箱
        {
            string id = SysService.EmailId(email);

            if (id == null)
            {
                return(Content("您输入的邮箱不存在", "text/html"));
            }
            else
            {
                string from     = "*****@*****.**";
                string password = "******";
                string fromname = "系统管理员";
                string smtp     = "smtp.qq.com";
                string port     = "25";
                string chaosong = "";
                string misong   = "";
                string to       = email;
                string title    = "双子星系统重置密码通知";
                string body     = "以下链接将重置您的密码为系统初始密码:<br><p>http://localhost:14003/User/EmailResetPsw?uid=" + id + "</p>";
                string f        = Sys.SysService.SendMail(from, password, fromname, smtp, port, chaosong, misong, to, title, body);
                return(Content("邮件发送成功", "text/html"));
            }
        }