%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim UsersRS__value
UsersRS__value = "zx"
if (Request.Form("Email") <> "") then UsersRS__value = Request.Form("Email")
%>
<%
set UsersRS = Server.CreateObject("ADODB.Recordset")
UsersRS.ActiveConnection = MM_bqsm_STRING
UsersRS.Source = "SELECT QSIQSName, QSIQSEmail, fusername, fpassword FROM QSIQSIndividual WHERE QSIQSEmail='" + Replace(UsersRS__value, "'", "''") + "'"
UsersRS.CursorType = 0
UsersRS.CursorLocation = 2
UsersRS.LockType = 3
UsersRS.Open()
UsersRS_numRows = 0
%>
<%
if Request.Form("submit") <> "" then
if UsersRS.eof and UsersRS.bof then
response.redirect "EmailFail.asp"
else
Dim objmail, mailbody
Set objmail = Server.CreateObject("Persits.MailSender")
Set Mail = Server.CreateObject("Persits.MailSender")
objmail.Host="mail.bqsm.gov.my" ' Specify a valid SMTP server
objmail.Username = "admin@bqsm.gov.my" 'Please specify the valid user account here
objmail.Password = "rbk239uv" ' Please specify you actual user password here
objmail.From="info@bqsm.gov.my"
objmail.FromName = "BQSM Secretariat"' optional
objmail.AddAddress Request.Form("Email")
objmail.Subject="Username and Password for BQSM e-membership"
mailbody="Hi " & UsersRS("QSIQSName") & ","
mailbody=mailbody & "
"
mailbody=mailbody & "Here is your username and password as per requested:"
mailbody=mailbody & "
"
mailbody=mailbody & "Username: " & UsersRS("fusername")
mailbody=mailbody & "
"
mailbody=mailbody & "Password: " & UsersRS("fpassword")
mailbody=mailbody & "
"
mailbody=mailbody & "BQSM Secretariat"
mailbody=mailbody & "
"
mailbody=mailbody & "BQSM's My CPD" & vbcrlf
mailbody=mailbody & "
"
mailbody=mailbody & "
"
objmail.Body=mailbody
objmail.IsHTML=True
objmail.Send
set objmail=Nothing
response.redirect "EmailSuccess.asp"
end if
end if
%>
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||