<% Dim strTo, strSubject, strBody 'Strings for recipient, subject, boby Dim objCDOMail 'The CDO object 'First we'll read in the values entered 'strTo = "info@atia-ps.com" strTo = Request.Form("conEmail") 'These would read the message subject and body if we let you enter it 'strSubject = Request.Form("subject") 'strBody = Request.Form("body") ' Both of these should be changed before you run this script. strSubject = "Enquiry Form" ' This is multi-lined simply for readability strBody = "House Hunters Webpage - Notice to Landlord" & vbCrLf strBody = strBody & "Landlord Information:" & vbCrLf strBody = strBody & "Name: " & Request.Form("inName") & vbCrLf strBody = strBody & "Phone No1: " & Request.Form("inPhone1") & vbCrLf strBody = strBody & "Phone No2: " & Request.Form("inPhone2") & vbCrLf strBody = strBody & "Fax: " & Request.Form("inFax") & vbCrLf strBody = strBody & "Email: " & Request.Form("inEmail") & vbCrLf strBody = strBody & "Remark: " & Request.Form("inRemark") & vbCrLf strBody = strBody & vbCrLf & "Building Information:" & vbCrLf strBody = strBody & "Location: " & Request.Form("inLoc") & vbCrLf strBody = strBody & "Block: " & Request.Form("inBlock") & vbCrLf strBody = strBody & "Floor: " & Request.Form("inFloor") & vbCrLf strBody = strBody & "Unit: " & Request.Form("inUnit") & vbCrLf strBody = strBody & "Building Name: " & Request.Form("inBldg") & vbCrLf strBody = strBody & "Address: " & Request.Form("inAddr") & vbCrLf strBody = strBody & "Size: " & Request.Form("inSize") & vbCrLf strBody = strBody & "Type: " & Request.Form("inRent") & vbCrLf strBody = strBody & "Price: " & Request.Form("inPrice") & " " & Request.Form("inType") & vbCrLf strBody = strBody & "Bedrooms: " & Request.Form("inBedrm") & vbCrLf strBody = strBody & "Bathrooms: " & Request.Form("inBathrm") & vbCrLf strBody = strBody & "Furnished: " & Request.Form("inFurn") & vbCrLf strBody = strBody & "Carparks: " & Request.Form("inCarpark") & vbCrLf strBody = strBody & "Additional Information: " & Request.Form("inAddition") & vbCrLf strBody = strBody & vbCrLf ' Some spacing: strBody = strBody & vbCrLf & vbCrLf If strTo = "" Or Not IsValidEmail(strTo) Then %>




Listing your property with House Hunters is an effortless way to reach renters or buyers.

Simply fill in the form below and we will contact you shortly!

Landlord Information:

*Name

*Telephone 1
Telephone 2
Fax
Email
Remarks

Building Information:

*Location: HK/Kowloon/N.T.

*Block:
*Floor:
*Unit:
*Building Name
*Address
*Size (s.f.)
*Rent/Sale/Both
*Rental/Price
Bedrooms:
Bathrooms:
Furnished / Unfurnished
Carparks:
Additional Information:

Please e-mail us pictures of your property and we will be happy to make a selection thereof for our website!

Send your pictures to info@househunters.com.hk

   


Address: Unit B, 7/F, Wyndham Place, 40-44 Wyndham Street, Central, Hong Kong Telephone: 2869 1001 Email: info@househunters.com.hk EAA License:C-005468

[Terms of use] Copyright House Hunters 2006
<% Else ' Create an instance of the NewMail object. Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = "House Hunters Webpage - Notice to Landlord " objCDOMail.To = strTo objCDOMail.Subject = strSubject objCDOMail.Body = strBody 'objCDOMail.Cc = "user@domain.com;user@domain.com" 'objCDOMail.Bcc = "hkone@producegreen.org.hk;ivykmwong@sinaman.com" 'objCDOMail.Importance = 1 '(0=Low, 1=Normal, 2=High) 'objCDOMail.AttachFile "c:\path\filename.txt", "filename.txt" objCDOMail.Send Set objCDOMail = Nothing Response.Write("OK") Response.Write(strTo) Response.Write(strSubject) Response.Write(strBody) Response.Redirect("notice.htm") %> <% End If ' End page logic %> <% ' Only functions and subs follow! ' A quick email syntax checker. It's not perfect, ' but it's quick and easy and will catch most of ' the bad addresses than people type in. Function IsValidEmail(strEmail) Dim bIsValid bIsValid = True If Len(strEmail) < 5 Then bIsValid = False Else If Instr(1, strEmail, " ") <> 0 Then bIsValid = False Else If InStr(1, strEmail, "@", 1) < 2 Then bIsValid = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then bIsValid = False End If End If End If End If IsValidEmail = bIsValid End Function %>