Prøv denne her
)
Kan ikke huske hvordan man sætter koden i boks
(
(kode)
<% if s = "PrivatGlemtHent" then
strusername = Trim(Request.Form("brugernavn"))
strmail = Trim(Request.Form("email"))
If len(strusername) = 0 Then
If len(strmail) = 0 Then
Response.Clear
Response.Redirect ("default.asp?s=GlemtLogin")
Else
Response.write ("Du søgte på")
Response.write ""
Response.write " " & (strmail)
Response.write ""
strmail = Replace(strmail,"'","''")
End if
Else
Response.write ("Du søgte på")
Response.write ""
Response.write " " & (strusername)
Response.write ""
strusername = Replace(strusername,"'","''")
End if
Set Conn = Server.CreateObject("ADODB.Connection")
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("database.mdb")
Conn.Open strDSN
strSQL = "SELECT * FROM privat WHERE "
strSQL = strSQL & " (pbrugernavn LIKE '%" & Request.form("brugernavn") & "%')"
strSQL = strSQL & " and (Pemail LIKE '%" & Request.form("email") & "%')"
Set RS = Conn.Execute(strSQL)
If rs.eof Then
response.write ("Der opstod en fejl.")
Response.END
else
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
Set JMail = Server.CreateObject("****.*******")
JMail.ServerAddress = ("**-**.******.***")
JMail.Sender = "support@silkejob.dk"
JMail.SenderName = "Silkejob.dk"
JMail.Subject = "Glemt password"
JMail.AddRecipient rs("pemail")
JMail.Body = "Hej " & rs("Pnavn") & vbCrLf & vbCrLf
JMail.Body= JMail.Body + "Dit brugernavn til silkejob.dk er: " & rs("Pbrugernavn") & vbCrLf & "Dit password er: " & rs("ppassword")& vbCrLf & vbCrLf
JMail.Body= JMail.Body + "Med Venlig Hilsen" & vbCrLf & vbCrLf & "SilkeJob.dk" & vbCrLf
' 1 - highest priority (Urgent)
' 3 - normal
' 5 - lowest
JMail.Priority = 3
JMail.Execute
Response.write ("Dine loginoplysninger er nu sendt til din mail.")
end if
end if
rs.Close
set rs = nothing
conn.Close
set Conn = Nothing
end if %>
(/kode)