Fasthosts told me last week that my contact form wont work anymore before they dont support CDONTS anymore and that I need to use cdosys instead. I have never used this and I am used to CDONTS so have no idea where to start.
They gave me some template text which is:
I assume I can swop ( Request.Form( "fromWho") ) for ("[email protected]")....
Then when it comes to this 'body' bit, I have like 6 different parts I need to capture - so how do I get all that into the body?
My Contact form is at www.kingsarmsbristol.com if you hit 'make a booking' a the top of the page you can see it there. the form code is:
Please help!
So i put that where my old
They gave me some template text which is:
Code:
<% SUB sendmail( fromWho, toWho, Subject, Body ) Dim objCDO Dim iConf Dim Flds Const cdoSendUsingPort = 2 Set objCDO = Server.CreateObject("CDO.Message") Set iConf = Server.CreateObject("CDO.Configuration") Set Flds = iConf.Fields With Flds .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "213.171.216.21" .Item(cdoSMTPServerPort) = 25 .Item(cdoSMTPconnectiontimeout) = 10 .Update End With Set objCDO.Configuration = iConf objCDO.From = fromWho objCDO.To = toWho objCDO.Subject = Subject objCDO.TextBody = Body objCDO.Send END SUB fromWho = TRIM( Request.Form( "fromWho") ) toWho = TRIM( Request.Form( "toWho") ) Subject = TRIM( Request.Form( "Subject" ) ) Body = TRIM( Request.Form( "Body") ) IF toWho <> "" THEN sendMail fromWho, toWho, Subject, Body 'Cleanup Set ObjCDO = Nothing Set iConf = Nothing Set Flds = Nothing END IF %>
Then when it comes to this 'body' bit, I have like 6 different parts I need to capture - so how do I get all that into the body?
My Contact form is at www.kingsarmsbristol.com if you hit 'make a booking' a the top of the page you can see it there. the form code is:
Code:
<form action="thankyou.asp" name="form1" id="form1" method="post" onSubmit="MM_validateForm('email','','RisEmail','yourname','','R','youremail','','RisEmail','yourtel','','R');return document.MM_returnValue"> <dl> <dt><label for="yourname">Your name:</label></dt> <dd><input name="yourname" id="yourname" style="width: 230px;" value="" type="text"></dd> </dl> <dl> <dt><label for="youremail">Your email:</label></dt> <dd><input name="youremail" id="youremail" style="width: 230px;" value="" type="text"></dd> </dl> <dl> <dt><label for="yourtel">Your telephone:</label></dt> <dd><input name="yourtel" id="yourtel" style="width: 230px;" value="" type="text"></dd> </dl> <dl> <dt><label for="requiredDate">Required date:</label></dt> <dd><input name="requiredDate" id="requiredDate" style="width: 130px;" value="" type="text"></dd> </dl> <dl> <dt><label for="requiredTime">Required time:</label></dt> <dd><input name="requiredTime" id="requiredTime" style="width: 100px;" value="" type="text"></dd> </dl> <dl> <dt><label for="requiredNumber">Party size:</label></dt> <dd><input name="requiredNumber" id="requiredNumber" style="width: 100px;" value="" type="text"> people</dd> </dl> <dl> <dt><label for="bookingType">Booking type:</label> </dt> <dd> <select name="bookingType" id="bookingType"> <option selected="selected">Lunch</option> <option>Dinner</option> <option>Private Party</option> <option>Wedding Reception</option> <option>Business Meeting</option> <option>Reserve a Table</option> <option>Live Sport</option> <option>Birthday Party</option> <option>Networking</option> </select> </dd> </dl> <dl> <dt><label for="bookingType">Message:</label></dt> <dd> <textarea name="message" cols="30" rows="4"></textarea> </dd> </dl> <dl> <dt></dt> <dd><input name="submit" type="image" src="http://www.kingsarmsbristol.com/images/send.png" alt="Send" id="Submit" value="Submit" /></dd> </dl> </form>
So i put that where my old
Comment