% id=request.querystring("id") Set conn = Server.CreateObject("ADODB.Connection") xDb_Conn_Str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("admin.mdb") & ";" conn.Open xDb_Conn_Str strsql = "SELECT video_requested_users.*, video_requested_users.id FROM video_requested_users WHERE (((video_requested_users.id)="&id&"));" Set sendPwd = Server.CreateObject("ADODB.Recordset") sendPwd.Open strsql, conn,3,3 useremail=sendPwd("emailid") fullname=sendPwd("fullname") username=left(fullname,4) & RandomNumber(9999,8888) password= RandomNumber(99999,77777) function RandomNumber(maxi,mini) maxvalue=maxi minvalue=mini Randomize Timer RandomNumber = Int((maxvalue- minvalue+ 1) * Rnd) + minvalue end function sendPwd("username")=username sendPwd("pwd")=password sendPwd("pwd_Generated_Date")=date() sendPwd.update sendPwd.close set sendPwd=nothing mailBody="
Dear "& fullname & "
" mailBody=mailBody & "Below are the credentials for accessing video 1000soccer.com.
" mailBody=mailBody & "Username : "&username& "
" mailBody=mailBody & "Password :"&password& "
" mailBody=mailBody & "This email is sent in response to your request for accessing video.
" mailBody=mailBody & "Click here to goto player's page at 1000soccer.com
" mailBody=mailBody & "Thank you.
" mailBody=mailBody & "1000soccer.com
" Err.Clear On Error Resume Next Set objMail = Server.CreateObject("CDO.Message") Set objConfig = Server.CreateObject("CDO.Configuration") objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" 'here you will be using the smpt server address objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ' here you will use the smpt server port number objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/cdoSendUserName") = "rodrigo@1000soccer.com" objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/cdoSendPassword") = "rodrigo1000" objConfig.Fields.Update set objMail.Configuration = objConfig objMail.Subject="1000soccer.com sent you credentials for accessing video" objMail.From="rodrigo@1000soccer.com" objMail.To=useremail objMail.HTMLBody=mailBody objMail.Send set objMail=nothing If Err.Number <> 0 Then Response.Write (Err.Description& "