如何将产生的密码记录并发送给用户并通过点击链接激活?

所属分类: 网络编程 / 编程10000问 阅读数: 530
收藏 0 赞 0 分享

<%@language="vbscript" %>
<%
set mail= server.CreateObject("cdonts.newmail")
mail.subject="
恭喜,您在随风起舞注册成功,感谢您的参与!"
mail.to = mailid mail.from ="song@intels.net"
mail.body= "
这是随风起舞寄给您的初始密码" & vbcrlf
&href='mailto:mailid="user@intels.net'>mailid="user@intels.net"
address="address"

set conn = server.CreateObject("adodb.connection")
conn.Open "dsn","uid","pwd"
set rec= conn.Execute("select count(*) from membertable")
id = cint(rec.fields(0))+1
r=rnd *50
Response.Write r & "<br>"
for i = 0 to 20
    if cint(r)>0 and cint(r)<26 then str=str +chr(97 + cint(r))
    r=rnd *100
next

Response.Write str
pwd=left(str,2)
pwd=pwd & id
pwd=pwd & right(str,2)
pwd=pwd & second(time)

%>
<br>
<%
set mail= server.CreateObject("cdonts.newmail")
mail.subject="
千花飞舞向您问候!"
mail.to = mailid
mail.from ="song@intels.net"
mail.body= "
这是随风起舞寄给您的初始密码" & vbcrlf & "您可以随时修改它" & vbcrlf &
pwd & vbcrlf & "
再次感谢光临随风起舞!"
mail.send
%>

 

[1]

更多精彩内容其他人还在看

如何决定是否将登录内容保存到Cookie里?

如何决定是否将登录内容保存到Cookie里?
收藏 0 赞 0 分享

如何在ASP中恰当地运用Cookies?

如何在ASP中恰当地运用Cookies?
收藏 0 赞 0 分享

如何在Flash中处理Cookies?

如何在Flash中处理Cookies?
收藏 0 赞 0 分享

如何实现全文检索?

如何实现全文检索?
收藏 0 赞 0 分享

如何用FileSystemObject组件来做一个站内搜索?

如何用FileSystemObject组件来做一个站内搜索?
收藏 0 赞 0 分享

如何做一个文本搜索?

如何做一个文本搜索?
收藏 0 赞 0 分享

如何做一个只搜索本网站的引擎?

如何做一个只搜索本网站的引擎?
收藏 0 赞 0 分享

如何实现歌曲在线点播?

如何实现歌曲在线点播?
收藏 0 赞 0 分享

如何实现网上考试?

如何实现网上考试?
收藏 0 赞 0 分享

网上考试设计思路是怎样的?

网上考试设计思路是怎样的?
收藏 0 赞 0 分享
查看更多