I want to send an e-mail through feedback form. The code is given below.. but when i compile it gives me an error. which is a syntax error. Pls help me.
Expand|Select|Wrap|Line Numbers
- <%
- dim mymail, body
- companyname=request.form("companyname")&"<br>"
- Contact_Person=request.form("contact_person")&"<br>"
- Designation=request.form("Designation")&"<br>"
- address=request.form("address")&"<br>"
- City=request.form("City")&"<br>"
- Pincode=request.form("Pincode")&"<br>"
- State=request.form("State")&"<br>"
- otherstate=request.form("otherstate")&"<br>"
- Country=request.form("Country")&"<br>"
- OtherCountry=request.form("OtherCountry")&"<br>"
- TelNo=request.form("TelNo")&"<br>"
- Faxno=request.form("FaxNo")&"<br>"
- from=request.form("From")&"<br>"
- requirement_details=Request.Form("requirement_details")&"<br>"
- set mymail=Server.CreateObject("CDONTS.NewMail")
- mymail.mailformat=0
- mymail.bodyformat=0
- mymail.to="fakemail@fakemail.com"
- mymail.from="fakemail@fakemail.com"
- mymail.body="Company Name: "&companyname&"<br>"Contact Person: "&contact_person&"<br>"Designation: "&Designation&"<br>"Address: "&address&"<br>"City: "&City&"<br>"Pincode: "&Pincode&"<br>"State: "&State&"<br>"Otherstate: "&otherState&"<br>"Country: "&Country&"<br>"Other Country: "&OtherCountry&"<br>"Telephone Number: "&telNo&"<br>"Email: "&From&"<br>"Requirement Details: "&requirement_details&"<br>"
- mymail.send
- if MyMail.send then
- Response.Write("Message Sent")
- else
- Response.Write("Message Not Sent")
- end if
- set MyMail = Nothing
- response.redirect"index.html"
- %>