Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - From CDONTS To JMAIL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

From CDONTS To JMAIL

 Post Reply Post Reply
Author
lana View Drop Down
Newbie
Newbie


Joined: 27 March 2003
Location: China
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote lana Quote  Post ReplyReply Direct Link To This Post Topic: From CDONTS To JMAIL
    Posted: 28 April 2003 at 12:38am

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>



Edited by lana
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2003 at 9:56am
http://www.dimac.net/ you will find lots of JMAIL examples on there.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.