function forget()
 {
     header("Content-Type:text/html; charset=utf-8");
     $cstmusrnm = $_POST['cstmusrnm'];
     $cstmusrml = $_POST['cstmusrml'];
     $cstmusr = M('cstmusr');
     if ($cstmusr->where("cstmusrnm='" . $cstmusrnm . "'")->find()) {
         if ($cstmusr->where("cstmusrnm='" . $cstmusrnm . "' AND cstmusrml='" . $cstmusrml . "'")->find()) {
             $cstmusro = $cstmusr->where("cstmusrnm='" . $cstmusrnm . "'")->find();
             //由于从邮箱进行点击链接是无法获取session的,所以存sql sql存一个是key 一个是时间戳
             $tm = time();
             //一样可以保证是同一个tm
             $vrf = md5($cstmusrnm . $tm);
             $ss = M('ss');
             $dt = array(ssvrf => $vrf, sstm => $tm, sscstmusrnm => $cstmusrnm);
             //刚刚创建好了立马用
             $ss->data($dt)->add();
             $cnt = $ss->count();
             $ssls = $ss->limit($cnt - 1, 1)->select();
             $ssid = $ssls[0]['ssid'];
             //得到公网地址
             $sys = M('sys');
             $syso = $sys->find();
             //发送邮件
             import('@.MAIL.MailAction');
             //$mail = new PHPMailer(); //实例化
             $mail = new MailAction();
             $mail->IsSMTP();
             // 启用SMTP
             $mail->Host = "smtp.163.com";
             //SMTP服务器 以163邮箱为例子
             $mail->Port = 25;
             //邮件发送端口
             $mail->SMTPAuth = true;
             //启用SMTP认证
             $mail->CharSet = "UTF-8";
             //字符集
             $mail->Encoding = "base64";
             //编码方式
             $mail->Username = "******";
             //你的邮箱
             $mail->Password = "******";
             //你的密码
             $mail->Subject = "Geek密码找回";
             //邮件标题
             $mail->From = "*****@*****.**";
             //发件人地址(也就是你的邮箱)
             $mail->FromName = "管理员";
             //发件人姓名
             $address = $cstmusrml;
             //收件人email
             $mail->AddAddress($address, $cstmusro['cstmusrnn']);
             //添加收件人(地址,昵称)
             //$mail->AddAttachment('xx.xls','我的附件.xls'); // 添加附件,并指定名称
             //$mail->IsHTML(true); //支持html格式内容
             //$mail->AddEmbeddedImage("logo.jpg", "my-attach", "logo.jpg"); //设置邮件中的图片
             $mail->Body = '你好, 请点击以下链接 http://' . $syso['sysip'] . '/' . $syso['sysnm'] . '/admin.php/Cstmusr/gtxpg/x/modifypwml/ssid/' . $ssid . '/vrf/' . $vrf . ' 如果您的邮箱不支持点击链接,那么请您将此链接粘贴至浏览器地址栏进行访问,此邮件30分钟内有效';
             //邮件主体内容
             //发送
             // 		if(!$mail->Send()) {
             // 			echo "Mailer Error: " . $mail->ErrorInfo;
             // 		} else {
             // 			echo "Message sent!";
             // 		}
             if ($mail->Send()) {
                 $data['status'] = 1;
                 $this->ajaxReturn($data, 'json');
             } else {
                 $data['status'] = 2;
                 $this->ajaxReturn($data, 'json');
             }
         } else {
             $data['status'] = 4;
             $this->ajaxReturn($data, 'json');
         }
     } else {
         $data['status'] = 3;
         $this->ajaxReturn($data, 'json');
     }
 }