<% @ Language = "vbscript" %>
<%
Set mail = server. CreateObject ("cdonts. newmail ")
Mail. subject ="Congratulations,You registered successfully,Thank you for your participation.! "
Mail. to = mailid mail. from = "song@intels.net"
Mail. body ="This is the initial password sent to you by dancing with the wind"& 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 ="Greetings from qihua! "
Mail. to = mailid
Mail. from = "song@intels.net"
Mail. body ="This is the initial password sent to you by dancing with the wind"& Vbcrlf &"You can modify it at any time"& Vbcrlf &
Pwd & vbcrlf &"Thank you again for dancing with the wind! "
Mail. send
%>
[1]