<% sendUrl = "http://schemas.microsoft.com/cdo/configuration/sendusing" smtpUrl = "http://schemas.microsoft.com/cdo/configuration/smtpserver" '++++++++++++++++++++++++++++++++++++' 'Email configuration '++++++++++++++++++++++++++++++++++++' clientname = "Sandeep Patel" ' Client Name hotelname = "American Inn Punta Gorda" ' Hotel Name websitename = "www.americaninnfl.com" ' Website Name clientemailid = "americaninnfl637@yahoo.com" ' Client Email ID respage = "reservation.asp" ' reservation.asp or reservation.php '++++++++++++++++++++++++++++++++++++' '++++++++++++++++++++++++++++++++++++' 'Request parameters '++++++++++++++++++++++++++++++++++++' chkindate = request("chk_in_date") chkoutdate = request("chk_out_date") adult = request("adult") child = request("children") rooms = request("selrooms") email = request("email") website = Request.ServerVariables("SERVER_NAME") if chkindate <> "" and chkoutdate <> "" and email <> "" then set con=server.CreateObject("ADODB.connection") set rs=server.CreateObject("ADODB.recordset") con.open "Provider=SQLOLEDB;Server=184.168.47.10;Initial Catalog=reviewTer_db;User Id=reviewter;Password=reviewter#12345;" sql="insert into tbl_obr(checkin,checkout,adult,child,rooms,email,website,obrdate) values ('"&chkindate&"','"&chkoutdate&"','"&adult&"','"&child&"','"&rooms&"','"&email&"','"&website&"','"&date()&"')" con.execute sql '++++++++++++++++++++++++++++++++++++' '++++++++++++++++++++++++++++++++++++' 'Email Body '++++++++++++++++++++++++++++++++++++' nm = "Dear "&clientname&"," &vbcrlf &vbcrlf nm = nm &"Hotel name: "&hotelname&"" &vbcrlf &vbcrlf nm = nm &"Website name: "&websitename&"" &vbcrlf &vbcrlf nm = nm &"The following reservation enquiry is made on your website:" &vbcrlf nm = nm &"===================================" &vbcrlf nm = nm &"Check in Date: "&chkindate&" " &vbcrlf nm = nm &"Check out Date: "&chkoutdate&" " &vbcrlf nm = nm &"Adult: "&adult&" " &vbcrlf nm = nm &"Children: "&child&" " &vbcrlf nm = nm &"Room: "&rooms&" " &vbcrlf nm = nm &"Guest email: "&email&" " &vbcrlf nm = nm &"===================================" &vbcrlf &vbcrlf nm = nm &"Please note that this email is just notification. This guest has checked availability and price on your website. If you have not received confirmed booking from this guest, you can get in touch with guest to offer him/her best suitable deal." &vbcrlf &vbcrlf nm = nm &"Regards," &vbcrlf nm = nm &"Cyberweb Hotels Support Team" &vbcrlf '++++++++++++++++++++++++++++++++++++' '++++++++++++++++++++++++++++++++++++' 'Set the mail server configuration '++++++++++++++++++++++++++++++++++++' Set objConfig=CreateObject("CDO.Configuration") objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net" objConfig.Fields.Update '++++++++++++++++++++++++++++++++++++' '++++++++++++++++++++++++++++++++++++' ' Create and send the mail '++++++++++++++++++++++++++++++++++++' Set objMail=CreateObject("CDO.Message") ' Use the config object created above Set objMail.Configuration=objConfig objMail.From = "enq-alert@sellvel.com" objMail.ReplyTo = email objMail.To = clientemailid objMail.Bcc = "amey@cyberwebhotels.com" objMail.Subject = "Booking Enquiry - "&websitename objMail.TextBody = nm objMail.Send '++++++++++++++++++++++++++++++++++++' response.redirect respage&"?chk_in_date="&chkindate&"&chk_out_date="&chkoutdate&"&adult="&adult&"&children="&child&"&selrooms="&rooms end if %>