Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 12-24-2004, 07:50 AM Error in E-mail Form
Novice Talker

Posts: 9
Trades: 0
am trying to adapt it to use with JMAil.

When you input a Username in the form it posts to another page and should retrieve the password. When I test it I get:

Microsoft VBScript compilation error '800a03ee'

Expected ')'

/asp_secure_login_development/forgotten_password2.asp, line 6

If (Request.Form(uaUsername") <> "") Then"
---------------------------^

I really can't see what I am doing wrong. The code for the page is:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/connUsers.asp" -->
<%
Dim rsRetrievePassword__MMColParam
rsRetrievePassword__MMColParam = "x"
If (Request.Form(uaUsername") <> "") Then
rsRetrievePassword__MMColParam = Request.Form(uaUsername")
End If
%>
<% If Trim(Request.Form("submit")) <> "" Then %>
<%
Dim rsRetrievePassword
Dim rsRetrievePassword_numRows

Set rsRetrievePassword = Server.CreateObject("ADODB.Recordset")
rsRetrievePassword.ActiveConnection = MM_connUsers_STRING
rsRetrievePassword.Source = "SELECT uaEmail,uaFirstname,uaPassword FROM tblUsers WHERE uaUsername = '" + Replace(rsRetrievePassword__MMColParam, "'", "''") + "'"
rsRetrievePassword.CursorType = 0
rsRetrievePassword.CursorLocation = 2
rsRetrievePassword.LockType = 1
rsRetrievePassword.Open()

rsRetrievePassword_numRows = 0
%>
<%
Dim var_done
var_done = "0"
If Not rsRetrievePassword.EOF Or Not rsRetrievePassword.BOF Then
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.mydomain.net:25"
JMail.Sender = "me@mydomain.net"
JMail.Subject = "Your Username and Password"

JMail.AddRecipient (rsRetrievePassword.Fields.Item("email").Value)

JMail.Body = "Your user information is below as requested:." & vbCrLf & vbCrLf
JMail.Body = JMail.Body & "User Name : " &(rsRetrievePassword.Fields.Item("email").Value ) & vbCrLf
JMail.Body = JMail.Body & "Password : " &(rsRetrievePassword.Fields.Item("email").Value ) & vbCrLf
JMail.Body = JMail.Body & "You may now use these to log on."

JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Execute
var_done = "1"
End If
End If
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Your password has been e-mailed to you.</title>
<link href="stylesheets/main.css" rel="stylesheet" type="text/css">
<meta http-equiv="refresh" content="3;URL=index.asp">
</head>

<body>
<div align="center">
<p class="heading1">Your password has been e-mailed to the e-mail address which you registered with. </p>
</div>
</body>
</html>
<% If Trim(Request.Form("submit")) <> "" Then %>
<%
rsRetrievePassword.Close()
Set rsRetrievePassword = Nothing
%>
<% End If %>
Funky Monk is offline
Reply With Quote
View Public Profile Visit Funky Monk's homepage!
 
 
Register now for full access!
Old 12-24-2004, 07:53 AM
Novice Talker

Posts: 9
Trades: 0
Doh! Fixed it!

If (Request.Form(uaUsername") <> "") Then

Should be If (Request.Form("uaUsername") <> "") Then"
Funky Monk is offline
Reply With Quote
View Public Profile Visit Funky Monk's homepage!
 
Reply     « Reply to Error in E-mail Form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20036 seconds with 12 queries