<% /* CDONTS code */ //just to make sure that any missing params are set to an empty string function validate(str){ if( str == "undefined" ){ return ""; }else{ return str; } } if (validate(Request.Form("Submit")+"") != "") { name = validate(Request.Form("frmName")+""); country = validate(Request.Form("frmState")+""); email = validate(Request.Form("frmEmail")+""); telehone = validate(Request.Form("frmPhone")+""); fax = validate(Request.Form("frmFax")+""); apartment = validate(Request.Form("frmApartments")+""); people = validate(Request.Form("frmPeople")+""); bedrooms = validate(Request.Form("frmBedrooms")+""); datein = validate(Request.Form("frmDateIn")+""); dateout = validate(Request.Form("frmDateOut")+""); comments = validate(Request.Form("frmComments")+""); howHearAboutUs = validate(Request.Form("frmHearAboutUs")+""); message = "Your Name: "+name+ "
State/Country: "+country+ "
Email Address: "+email+ "
Telephone: "+telehone+ "
Fax: "+fax+ "
Serviced Apartment interested in: "+apartment+ "
Number of People: "+people+ "
Number of Bedrooms: "+bedrooms+ "
Date In "+datein+ "
Date Out: "+dateout+ "
Other information or Comments: "+comments+ "
How did you hear about us?: "+howHearAboutUs; %> <% if (name == "" && country == "" && email == "" && telehone == "" && fax == "" && datein == "" && dateout == "" && comments == "") { // do nothing message = message + "
Needed fields are not filled." } else { // reservations@londonapartment.co.uk // create email /*var objMail = Server.CreateObject("CDONTS.NewMail"); objMail.MailFormat = 0; objMail.From = ""; objMail.To = "reservations@londonapartment.co.uk"; objMail.Subject = "Email Response Form - London Apartments"; objMail.Body = message; // enable HTML email objMail.MailFormat = 0 objMail.BodyFormat = 0 // send email bResult = objMail.Send(); // delete email delete objMail;*/ var iConf = Server.CreateObject("CDO.Configuration") iConf.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2; iConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "84.45.9.20"; iConf.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25; //Flds(cdoSMTPAccountName) = "My Name" //Flds(cdoSMTPAuthenticate) = cdoBasic ' 1 //Flds(cdoSendUserName) = "domain\username" //Flds(CdoSendPassword) = "password" //Flds(cdoSendEmailAddress) = """MySelf"" " //Flds(cdoSMTPUseSSL) = True iConf.Fields.Update(); var objMail = Server.CreateObject("CDO.Message"); objMail.Configuration = iConf; //objMail.MailFormat = 0; objMail.From = ""; objMail.To = ""; objMail.Subject = "Email Response Form - London Apartments"; objMail.HtmlBody = message; // enable HTML email //objMail.MailFormat = 0 //objMail.BodyFormat = 0 // send email bResult = objMail.Send(); // delete email delete objMail; %> <%= "

Thank you for your interest, we will contact you shortly

" %> <% } //message %> <% } %>