当用户忘记密码时,他们会输入他们的电子邮件,并且会有一个重置密码链接。如何在.HTMLBody CDO.Message中创建href =“”链接或重置链接?在第50行。如果有更好的方式让我知道。我非常感谢你的帮助。
<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%
DIM strEmail
strEmail = Request.Form("email")
IF strEmail <> "" THEN
%>
<%
DIM objDB, rs, rssql
Set objDB = Server.CreateObject("ADODB.Connection")
objDB.Open "Provider=MSDASQL.1;Password=langas;Persist Security Info=True;User ID=mmsg;Data Source=mmsg_web"
rssql = "SELECT email_addr, medacist_password FROM medacist_user WHERE email_addr = '" & strEmail & "'"
Set rs = objDB.Execute(rssql)
IF rs.EOF THEN
Response.Write "That email address was not found in our database. Please click Back on your browser and enter the email address you registered with."
ELSE
DIM strPassword, rs_link
set strPassword = rs("medacist_password")
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "10.1.1.186" 'Ongoing sever SMTP required \\'
'' .Item(cdoSMTPAuthenticate) = 1'
'' .Item(cdoSendUsername) ="<enter_username>"
' ' .Item(cdoSendPassword) ="<enter_password>"''
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "email@email.com"
.To = strEmail
.Subject = "Forgotten Password IP TextBody"
.HTMLBody = "Please click below link to reset your password: <br>"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
Response.Write "Your password has been sent to your email address."
END IF
ELSE
Response.Write "Please click Back on your browser and enter the email address you registered with."
END IF
%>
答案 0 :(得分:0)
加入你的身体,可能会对你有所帮助: -
.HTMLBody = "Please click below link to reset your password: <br> <a href='http://yourresetpassword.html'>Click this link to reset your password</a>"