<% Dim Subj Dim Nme Dim Add Dim Cty Dim Cntry Dim Phne Dim Eml Dim Comm Dim Dte ID = request.form("TXTID") Subj = request.form("subject") Nme = request.form("name") Add = request.form("address") Cty = request.form("city") Cntry = request.form("country") Phne = request.form("phone") pmob = request.form("mob") Eml = request.form("email") pbed = request.form("bed") IncomeType = request.form("sal") cont = request.form("contact") contacttime = request.form("ConTime") visitD = request.form("VisitDate") if visitD <> "" then Dim MyVar,MyArray,visit MyVar = visitD MyArray = Split(MyVar," ") visit = MyArray(0) else visit = date() end if 'response.write visit fin = request.form("finance") Comm = request.form("TXTcomments") Dte = request.form("TXTDte") 'response.write Subj Dim AdoCon Dim RsEnq Dim SQLEN set AdoCon = server.createobject("ADODB.CONNECTION") set RsEnq = server.createobject("ADODB.RECORDSET") AdoCon.Open "Driver={MICROSOFT ACCESS DRIVER (*.mdb)};DBQ=" & server.mappath("/DB/fh.mdb") 'AdoCon.Open "dd" SQLEN ="INSERT INTO enquiries(PROPID,subject,Cname,city,country,phone,mobile,email,bedrooms,salaried,wantContact,ContactTime,visitDubai,finance,comments,enquirydate)VALUES('" & ID &_ "','"& Subj &_ "','" & Nme &_ "','" & Cty&_ "','" & Cntry &_ "','" & Phne &_ "','" & pmob &_ "','" & Eml &_ "','" & pbed &_ "','" & IncomeType &_ "','" & cont &_ "','" & contacttime &_ "','" & visit &_ "','" & fin &_ "','" & Comm &_ "','" & Dte & "')" 'response.write SQLEN On Error Resume next RsEnq.Open SQLEN, AdoCon mailbody="Following are the enquiry details

Date: " & Dte & "
Property Name: "& Subj &"
Name: " & Nme & "
" &_ "City: " & Cty & "
" &_ "Country: " & Cntry & "
" &_ "Phone: " & Phne & "
" &_ "mobile: " & pmob & "
" &_ "email: " & Eml & "
" &_ "bedrooms: " & pbed & "
" &_ "salaried: " & IncomeType & "
" &_ "wantContact: " & cont & "
" &_ "ContactTime: " & contacttime & "
" &_ "visitDubai: " & visit & "
" &_ "finance: " & fin & "
" &_ "comments: " & Comm & "
" &_ "Property Link: http://futurehomesdubai.com/overview.asp?projID=" & ID & "
" 'Response.write (mailbody) Sendmail Eml,"Sales@futurehomesdubai.com","Enquiry from website for Property " & Subj ,mailbody,"mail.futurehomesdubai.com" function Sendmail(sender,receiver,subject,mailbody,mailserver) sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(sch & "sendusing") = 2 ' cdoSendUsingPort .Item(sch & "smtpserver") = "mail.futurehomesdubai.com" .Item(sch & "smtpuser") = "luke@futurehomesdubai.com" .Item(sch & "smtppassword") = "lk@4321@" .update End With Set cdoMessage = CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = sender .To = "Sales@futurehomesdubai.com" .Subject = subject .HTMLBody = mailbody .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing if err.number<>0 then 'Response.write err.description end if end Function %> Enquiry Sent
Your Enquiry has been sent... waiting to redirect. If your browser doesn't redirect you please click here
<% AdoCon.Close %>