<%@ LANGUAGE="VBSCRIPT" %> <% option explicit %> <% Response.Buffer = True %> <% 'Declaring Variables Dim smtpserver,youremail,yourpassword,Enquiry_Title,Enquiry_Name,Enquiry_Email,Enquiry_Tel Dim Enquiry_Subject,Enquiry_Body,Action,IsError ' Edit these 3 values accordingly smtpserver = "mail.e-biz-travel.com" youremail = "bee@e-biz-travel.com" yourpassword = "ebiz2005" ' Grabbing variables from the form post Enquiry_Title = Request.Form("Enquiry_Title") Enquiry_Name = Request.Form("Enquiry_Name") Enquiry_Email = Request.Form("Enquiry_Email") Enquiry_Tel = Request.Form("Enquiry_Tel") Enquiry_Subject = Request.Form("Enquiry_Subject") Enquiry_Body = Request.Form("Enquiry_Body") Action = Request.Form("Action") ' Used to check that the email entered is in a valid format Function IsValidEmail(Email) Dim ValidFlag,BadFlag,atCount,atLoop,SpecialFlag,UserName,DomainName,atChr,tAry1 ValidFlag = False If (Email <> "") And (InStr(1, Email, "@") > 0) And (InStr(1, Email, ".") > 0) Then atCount = 0 SpecialFlag = False For atLoop = 1 To Len(Email) atChr = Mid(Email, atLoop, 1) If atChr = "@" Then atCount = atCount + 1 If (atChr >= Chr(32)) And (atChr <= Chr(44)) Then SpecialFlag = True If (atChr = Chr(47)) Or (atChr = Chr(96)) Or (atChr >= Chr(123)) Then SpecialFlag = True If (atChr >= Chr(58)) And (atChr <= Chr(63)) Then SpecialFlag = True If (atChr >= Chr(91)) And (atChr <= Chr(94)) Then SpecialFlag = True Next If (atCount = 1) And (SpecialFlag = False) Then BadFlag = False tAry1 = Split(Email, "@") UserName = tAry1(0) DomainName = tAry1(1) If (UserName = "") Or (DomainName = "") Then BadFlag = True If Mid(DomainName, 1, 1) = "." then BadFlag = True If Mid(DomainName, Len(DomainName), 1) = "." then BadFlag = True ValidFlag = True End If End If If BadFlag = True Then ValidFlag = False IsValidEmail = ValidFlag End Function %> Enquiry Form ( Powered By E-Biz-Travel.com )
<% If Action = "SendEmail" Then ' Here we quickly check/validate the information entered ' These checks could easily be improved to look for more things If IsValidEmail(Enquiry_Email) = "False" Then IsError = "Yes" Response.Write("You did not enter a valid email address.
") End If If Enquiry_Name = "" Then IsError = "Yes" Response.Write("You did not enter a Name.
") End If If Enquiry_Subject = "" Then IsError = "Yes" Response.Write("You did not enter a Subject.
") End If If Enquiry_Body = "" Then IsError = "Yes" Response.Write("You did not enter a Enquiry Massage.
") End If End If ' If there were no input errors and the action of the form is "SendEMail" we send the email off If Action = "SendEmail" And IsError <> "Yes" Then Dim strBody ' Here we create a nice looking html body for the email strBody = strBody & "Enquiry Form submitted at " & Now() & vbCrLf & "

" strBody = strBody & "From http://" & Request.ServerVariables("HTTP_HOST") & vbCrLf & "
" strBody = strBody & "IP " & Request.ServerVariables("REMOTE_ADDR") & vbCrLf & "
" strBody = strBody & "Title" & " : " & " " & Replace(Enquiry_Title,vbCr,"
") & "
" strBody = strBody & "Name" & " : " & " " & Replace(Enquiry_Name,vbCr,"
") & "
" strBody = strBody & "Email" & " : " & " " & Replace(Enquiry_Email,vbCr,"
") & "
" strBody = strBody & "Tel." & " : " & " " & Replace(Enquiry_Tel,vbCr,"
") & "
" strBody = strBody & "Subject" & " : Enquiry(Thailand) - " & " " & Replace(Enquiry_Subject,vbCr,"
") & "
" strBody = strBody & "
" & Replace(Enquiry_Body,vbCr,"
") & "
" strBody = strBody & "
" Dim ObjSendMail Set ObjSendMail = Server.CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False) ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 ' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = youremail ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = yourpassword ObjSendMail.Configuration.Fields.Update 'End remote SMTP server configuration section== ObjSendMail.To = youremail ObjSendMail.Subject = Enquiry_Subject ObjSendMail.From = Enquiry_Email ' we are sending a html email.. simply switch the comments around to send a text email instead ObjSendMail.HTMLBody = strBody 'ObjSendMail.TextBody = strBody objSendMail.Cc = "sandy@e-biz-travel.com" ObjSendMail.Send Set ObjSendMail = Nothing ' change the success messages below to say or do whatever you like ' you could do a response.redirect or offer a hyperlink somewhere.. etc etc %>
Your enquiry has been sent to us.
Thank You !!!
for using E-Biz Travel Service We will get back to you shortly.


e-Biz Travel Co.,Ltd (Thailand)
Central Reservation Office, Bangkok operating hours :
Monday - Friday 9:00 a.m. - 6:30 p.m., Saturday 9:00 a.m. - 1:00 p.m. (GMT+07:00)
Office Close on Sunday & Thailand Public Holidays
Bangkok Office : 31 Phyathai Building, 9th Floor, Room No. 916, Phyathai Road,
Phyathai, Ratchthevi, Bangkok, Thailand 10400
Tel : +66 2246-1400 to 2 Fax : +66 2246-1403  ( Contact Person : Susan )

   We will respond to your request promptly. Under normal circumstances you will hear from us within 24 hours and within 48 hours during weekend/holidays. However, sometimes due to technical circumstances that are beyond our control and if you do not hear from us, please send us a reminder with hotel subject to contact@e-biz-travel.com. We really appreciate this. You can count on our commitment to ensure that your enquiry or reservation request is promptly attended to.

At your services always !

<% Else %>
ENQUIRY FORM :
Important !!! Pls furnish complete email address so that our reply could reach you.
Name : *
Email : *
Tel. :
Subject : * (Please indicate package name & city)
Enquiry :
 
<% End If %> [ E-Biz-Travel.com ]