Click here to Skip to main content
15,890,123 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: web services Pin
Vasudevan Deepak Kumar2-Mar-06 1:20
Vasudevan Deepak Kumar2-Mar-06 1:20 
QuestionEmail sending using SMTP Pin
Sgn_Flex24-Feb-06 18:16
Sgn_Flex24-Feb-06 18:16 
AnswerRe: Email sending using SMTP Pin
Vasudevan Deepak Kumar1-Mar-06 23:05
Vasudevan Deepak Kumar1-Mar-06 23:05 
QuestionXML Parsing Problem Pin
Jimbalaya524-Feb-06 12:08
Jimbalaya524-Feb-06 12:08 
GeneralRe: XML Parsing Problem Pin
Guffa24-Feb-06 22:09
Guffa24-Feb-06 22:09 
AnswerRe: XML Parsing Problem Pin
darkelv25-Feb-06 19:55
darkelv25-Feb-06 19:55 
QuestionRundll32 command via Batch file executed through cgi Pin
ericeh24-Feb-06 11:32
ericeh24-Feb-06 11:32 
QuestionHow to email user their forgotten password with asp, ms sql and JMail Pin
Anessa200624-Feb-06 9:58
Anessa200624-Feb-06 9:58 
Hello,

Newbie here. I'm trying create a simple, one-page ASP form that allows users to enter their email address, click submit, and if the email address has a match in the MS SQL database, use JMail to email them their password. below is the code. Please note that the include 'db.inc' is the database connection. Any help would be greatly appreciated. Examples are best as I'm learning. Thanks.

<code>
<%@ LANGUAGE="VBSCRIPT" %>
<!-- #include file="db.inc" -->
<%
'Check if the form has been processed
If Request.Form("process")="true" Then
'Check the recordset for a valid record
"SELECT * FROM Employers WHERE email = '" & email & "'"
End If
%>

<head>
<title>Send Password</title>
</head>
<body>
<%
'checks if email address exists in the database before sending a message.
If objrs.EOF then
%>
<table border="0" cellPadding="0" cellSpacing="1" width="540">
<tr>
<td class="title-err" bgcolor="#FF0000"><font color="#FFFFFF"><b>Invalid Email Address</b></font></td>
</tr>
</table>
<p><span class="text-err">We could not find</span><span class="text3b"> <%=email%></span>
<span class="text-err"> in our database.</span></p>
<% Else %>


<%
'sets variables
email = request.form("email")
'chooses username and password from database that correspond to submitted email address.
pass = objrs.Fields("pw")

Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "REMOVED FOR FORUM POST"
JMail.Sender = "EMAIL REMOVED FOR FORUM POST"
JMail.Subject = "Your Password"
JMail.AddRecipient = email
JMail.Body = "Your user name and password are below as requested:" & vbCrLf
JMail.Body = JMail.Body & "Per your request your account login information is: " & vbCrlf & vbCrlf _
& "Password=" & pw & vbCrlf
JMail.Body = JMail.Body & "You may now use these to log on"

JMail.Priority = 3
JMail.Execute
%>

<p class="text2">We just sent your login information to <%=email%>.<br>
You should receive it shortly.</p>
<%
' Close Data Access Objects and free connection variables
objDC.Close
Set objRS = Nothing
'Set objDC = Nothing
%>
<%end if%>

</body>
</html>
</code>
AnswerRe: How to email user their forgotten password with asp, ms sql and JMail Pin
Vasudevan Deepak Kumar2-Mar-06 1:22
Vasudevan Deepak Kumar2-Mar-06 1:22 
Questionasp default button Pin
cmarmr24-Feb-06 7:04
cmarmr24-Feb-06 7:04 
AnswerRe: asp default button Pin
Divya Rathi24-Feb-06 9:30
Divya Rathi24-Feb-06 9:30 
QuestionWinHTTP Pin
mdw77724-Feb-06 6:14
mdw77724-Feb-06 6:14 
AnswerRe: WinHTTP Pin
Vasudevan Deepak Kumar2-Mar-06 1:23
Vasudevan Deepak Kumar2-Mar-06 1:23 
QuestionIE6 and/or IIS problem Pin
Rav3n24-Feb-06 2:13
Rav3n24-Feb-06 2:13 
Questionvirtual directory problem with asp.net app Pin
niki patel23-Feb-06 19:27
niki patel23-Feb-06 19:27 
AnswerRe: virtual directory problem with asp.net app Pin
Guffa23-Feb-06 21:41
Guffa23-Feb-06 21:41 
QuestionCGI requires which web server? Pin
RamL23-Feb-06 16:44
RamL23-Feb-06 16:44 
AnswerRe: CGI requires which web server? Pin
Vasudevan Deepak Kumar2-Mar-06 1:24
Vasudevan Deepak Kumar2-Mar-06 1:24 
QuestionAnybody Really Good With FCKEditor??? Pin
code-frog23-Feb-06 9:17
professionalcode-frog23-Feb-06 9:17 
AnswerRe: Anybody Really Good With FCKEditor??? Pin
Al Ortega24-Feb-06 14:40
Al Ortega24-Feb-06 14:40 
QuestionHow to set the headers of a shdocvw.dll webbrowser control ? Pin
DumitruC23-Feb-06 2:45
DumitruC23-Feb-06 2:45 
QuestionDropDownList and SQL question Pin
Illegal Operation23-Feb-06 2:31
Illegal Operation23-Feb-06 2:31 
AnswerRe: DropDownList and SQL question Pin
Divya Rathi23-Feb-06 6:10
Divya Rathi23-Feb-06 6:10 
QuestionAccesing the size of textual elements on a web page Pin
llp00na23-Feb-06 1:05
llp00na23-Feb-06 1:05 
QuestionSQL statement Pin
angelagke22-Feb-06 16:23
angelagke22-Feb-06 16:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.