|
Hi Can some one help me please , i want to change this getpassword.asp page code, need Jmail instead of CDONTS (case server support ). the page can send an email with password after the member insert his email .
Thanks a lot -------------------------------------------------------
getpassword.asp
<!--#include file="conn.asp"--> <% mailerror = false If Request.Form("password") <> "" Then
txtemail = Request.Form("Email") set rs = server.createobject("adodb.recordset") sql = "Select * From Users Where Email='" & txtEmail & "';" rs.open sql, conn, 3, 3 If not rs.eof then Dim myMail, myBody Set myMail = CreateObject("CDONTS.NewMail") myBody= "Your username is " & rs("Username") & vbCRLF & "Your password is " & rs("Password") & vbCRLF & "Your are receiving this email from a request at YOUR WEB." & vbCRLF & _ "If you received this email in error, please contact us" myMail.From="YOUR MAIL ADDRESS" myMail.To= txtemail myMail.Subject="Requested Username/Password" myMail.Body=myBody myMail.Send set mymail=nothing rs.close set rs = nothing conn.close set conn = nothing Response.redirect("success.asp") else mailerror = true end if end if %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Get password</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content=, name=Keywords> <META content=, name=description> <link href="style.css" rel="stylesheet" type="text/css"> <META content="MSHTML 5.50.4134.100" name=GENERATOR> </HEAD>
<BODY> <span class="dochead">Forgot password ?</span><br> If you have forgot your password, just fill in the e-mail you used when you registered.<br> Your username and password will be mailed to this address. <%if mailerror = true then %><b><span class="required"><p>Invalid email address. Please try again</p></span></b><%end if%><form action="getpassword.asp" method="post"> <INPUT TYPE="HIDDEN" NAME="password" VALUE="yes">
Email: <input onmouseover=this.focus() class="niceinput" name="Email" type="text" size="20">
<input class="niceinput" name="Submit" type="submit" value="Submit"> <br><a href="default.asp">Home</a>
</BODY></HTML>
|