%
name = trim(request("txtName"))
email = trim(request("txtEmail"))
msg = trim(request("txtMsg"))
f_name = trim(request("txtfname"))
f_email = trim(request("txtfemail"))
Submit = trim(request("submit"))
if Submit <> "" then
if name = "" and email = "" and f_name = "" and f_email = "" then
main_err="All fields are Mandatory. "
end if
if email <> "" then
if instr(email,"@") = false or instr(email,".") = false or len(email) < 8 then
main_err=main_err&"Invalid Email, please check "
end if
end if
if f_email <> "" then
if instr(f_email,"@") = false or instr(f_email,".") = false or len(f_email) < 8 then
main_err=main_err&"Invalid Friend's Email, please check "
end if
end if
if main_err = "" then
Set myMail=CreateObject("CDO.Message")
myMail.Subject="I would like to share this website with you"
myMail.From= """" + name + """<" + email + ">"
myMail.To= """" + f_name + """<" + f_email + ">"
myMail.HTMLBody = "Hi " + f_name + ", I would like to share some information with you.
Please click on the following link http://www.physiokit.com.sg
" + msg + "
Best Regards, " + name
myMail.Send
set myMail=nothing
response.redirect "taf_thanku.html"
end if
end if
%>