📄 serachpass.asp
字号:
<!--#include file="conn.asp"-->
<%
dim sql
dim nichen
dim email
dim subject
dim yourpassword
dim yourname
nichen=trim(request("usernichen"))
If nichen="" Then
response.write "<script language='javascript'>" & chr(13)
response.write "alert('先把名字输入呀!');" & Chr(13)
response.write "window.document.location.href='modify.asp';"&Chr(13)
response.write "</script>" & Chr(13)
response.end
'发邮件给用户,先需要索检用户的名称和MAIL,然后将密码发送给用户
End If
sql="select * from myclass where nichen='"+Request.form("usernichen")+"'"
rs.open sql,conn,1,1
nichen=rs("nichen")
email=trim(rs("email"))
yourname=trim(rs("name"))
subject="接收你的密码"
yourpassword=trim(rs("password"))
rs.close
set rs=nothing
conn.close
set conn=nothing
'建立一个CDONTS.NewMail对象
Set objMail=Server.CreateObject("CDONTS.NewMail")
'设置寄件人
objMail.From="intereye@etang.com"
'设置收件人
objMail.To=email
'设置邮件主题
objMail.Subject=Subject
'设置邮件内容
objMail.Body="你好,"&yourname&"!你的密码是:"&yourpassword&"要记牢啊!下次可不能忘了!"
'将邮件格式设成HTML,若这两行省略,则使用默认的TXT格式。
'objMail.BodyFormat = 0
'objMail.MailFormat = 0
'寄出邮件
objMail.Send
response.write "<script language='javascript'>" & chr(13)
response.write "alert('密码已经寄到你的注册邮箱里了!');" & Chr(13)
response.write "window.document.location.href='index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
response.end
%>
<head><title>找回密码</title></head>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -