Kan det bero på att du har On error resume next med, kommentera bort det.
Frågan#1
Hej hej! Tack för all hjälp här! Kan ni också titta på denna kod! Jag får inget fel meddelande, det e bara att mejlen inte kommer fram! Jag har inte gjort detta script själv!
<%
'Replace the email address below with your email address
fromemail = "support@firegamez.com"
'Grab the submitted variables (page is the page they've come from, set by the hidden variable at the login box)
username = Request.Form("username")
'Check no s**t is trying to hack in using SQL commands
if InStr(username, "'") or InStr(username, """") or InStr(username, "=") then
sqlflag = True
end if
'Open connection
%>
<!--#include file="conn.asp"-->
<%
'Get a recordset corresponding to the submitted username and password
sql = "SELECT password, email FROM users WHERE username = '" & username & "' AND active = True"
Set rsUser = Server.CreateObject("ADODB.Recordset")
rsUser.Open sql, conn, 3, 3
'If there was a valid recordset there, then send them back to the page they came from, with the username cookie set
If (not rsUser.BOF) and (not rsUser.EOF) and sqlflag <> True then
On error resume next
set objMail = Server.CreateObject("CDONTS.NewMail")
if err.number <> 0 then
noObj = True
else
mailbody = "Tja " & username & vbcrlf & vbcrlf
mailbody = mailbody & "Ditt lösenord till Firegamez är:" & vbcrlf & vbcrlf
mailbody = mailbody & " " & rsUser("password") & vbcrlf & vbcrlf
mailbody = mailbody & "----------------------------------------------------" & vbcrlf
mailbody = mailbody & "Firegamez.com [url]http://www.firegamez.com[/url]"
objMail.Body = mailbody
objMail.to = rsUser("email")
objMail.from = fromemail
objMail.subject = "Glömt lösenordet"
objMail.send
set objMail = nothing
sentok = true
end if
end if
'Otherwise, display an invalid entry screen
rsUser.close
set rsUser = nothing
conn.close
set conn = nothing%>
