标签:hold success als 密码 rom new set smtps --
在AppSetting中的配置
<add key="smtpSever" value="smtp.qq.com"/>
<add key="mailFrom" value="912549963@qq.com"/>
<add key="SmtpUserName" value="912549963@qq.com" />
<add key="smtpSeverPwd" value="XXXXXX"/>//登陆网站的密码
-----------------------------------------------------------------------------------------------------------------
<p class="long-input ue-clear">
<label>请输入手机验证码:</label>
<input type="text" id="newPwd" name="VailteCode" required="required" class="form-control" placeholder="请输入手机验证码" />
<input type="button" class="tijiao" id="valiteBtn" value="发送手机验证码" />
</p>
$("#valiteBtn").click(function () {
$.ajax({
url: "/UserInfo/SendMsg",
type: "post",
data: "",
dataType: "json",
success: function (data) {
if (data.Pass) {
layer.msg(data.Msg, { icon: 1, time: 2000 });
}
else {
layer.msg(data.Msg, { icon: 2, time: 2000 });
}
},
error: function (msg) {
layer.msg(msg.status, { icon: 2, time: 2000 });
}
});
});
public ActionResult SendMsg()
{
ResultModel rm = new ResultModel();
string result=DataHelper.SendMessage();
if (result == "失败")
{
rm.Pass = false;
rm.Msg = "发送失败";
}
else
{
RedisManager.ClientManager.Set("Msg" + LoginUser.ID, result);
rm.Pass = true;
rm.Msg = "发送成功";
}
return Json(rm);
}
标签:hold success als 密码 rom new set smtps --
原文地址:https://www.cnblogs.com/ZkbFighting/p/8758620.html