<%
'If the form has been submitted execute the following code
Else
'receive the form values
Dim title, firstname, lastname, address, country, contact, email, subjectofenquiry, text
stitle=Request.Form("title")
sfirstname=Request.Form("firstname")
slastname=Request.Form("lastname")
saddress=Request.Form("address")
scountry=Request.Form("country")
scontact=Request.Form("contact")
semail=Request.Form("email")
ssubjectofenquiry=Request.Form("subjectofenquiry")
stext=Request.Form("text")
' create the HTML formatted email text
Dim sEmailText
sEmailText = sEmailText & ""
sEmailText = sEmailText & ""
sEmailText = sEmailText & "
Online Enquiries / Feedback Form"
sEmailText = sEmailText & ""
sEmailText = sEmailText & ""
sEmailText = sEmailText & "
"
sEmailText = sEmailText & "Title: " & stitle & "
"
sEmailText = sEmailText & "First name: " & sfirstname & "
"
sEmailText = sEmailText & "Last name: " & slastname & "
"
sEmailText = sEmailText & "Address: " & saddress & "
"
sEmailText = sEmailText & "Country: " & scountry & "
"
sEmailText = sEmailText & "Contact: " & scontact & "
"
sEmailText = sEmailText & "Email: " & semail & "
"
sEmailText = sEmailText & "Subject of enquiry: " & ssubjectofenquiry & "
"
sEmailText = sEmailText & "Text: " & stext & "
"
sEmailText = sEmailText & "Date & Time: " & Now() & "
"
'sEmailText = sEmailText & "IP : " & Request.ServerVariables("REMOTE_ADDR")
sEmailText = sEmailText & ""
sEmailText = sEmailText & ""
sEmailText = sEmailText & ""
'create the mail object
Set NewMailObj=Server.CreateObject("CDONTS.NewMail")
NewMailObj.From=sEmail 'This is the email of the feedback sender
NewMailObj.To = "enquiry@midom.com.sg" 'change to your address
NewMailObj.Subject = "Online Enquiries / Feedback Form"
NewMailObj.Body = sEmailText
'you need to add these 2 lines for the mail to be sent in HTML format
'remove them and the email will be sent in Text format
NewMailObj.BodyFormat = 0
NewMailObj.MailFormat = 0
NewMailObj.Send
Set NewMailObj=Nothing
Response.write "
"
Response.write ""
Response.write "Thank you for submitting your feedback. | "
Response.write "
"
Response.write"
"
End If
%>