<%
'If the form has been submitted execute the following code
Else
'receive the form values
Dim title, firstname, lastname, address, postal, contact, email, model, serial, typeno, placeofpurchase, dateofpurchase, monthofpurchase, yearofpurchase
stitle=Request.Form("title")
sfirstname=Request.Form("firstname")
slastname=Request.Form("lastname")
saddress=Request.Form("address")
spostal=Request.Form("postal")
scontact=Request.Form("contact")
semail=Request.Form("email")
smodel=Request.Form("model")
sserial=Request.Form("serial")
stypeno=Request.Form("typeno")
splaceofpurchase=Request.Form("placeofpurchase")
sdateofpurchase=Request.Form("dateofpurchase")
smonthofpurchase=Request.Form("monthofpurchase")
syearofpurchase=Request.Form("yearofpurchase")
' create the HTML formatted email text
Dim sEmailText
sEmailText = sEmailText & ""
sEmailText = sEmailText & ""
sEmailText = sEmailText & "
Online Warranty Registration"
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 & "Postal: " & spostal & "
"
sEmailText = sEmailText & "Contact: " & scontact & "
"
sEmailText = sEmailText & "Email: " & semail & "
"
sEmailText = sEmailText & "Model: " & smodel & "
"
sEmailText = sEmailText & "Serial: " & sserial & "
"
sEmailText = sEmailText & "Type no: " & stypeno & "
"
sEmailText = sEmailText & "Place of purchase: " & splaceofpurchase & "
"
sEmailText = sEmailText & "Date of purchase: " & sdateofpurchase & "
"
sEmailText = sEmailText & "Month of purchase: " & smonthofpurchase & "
"
sEmailText = sEmailText & "Year of purchase: " & syearofpurchase & "
"
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 Warranty Registration"
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 warranty registration. | "
Response.write "
"
Response.write"
"
End If
%>