IMA Hero: Request a Brochure
<%
'image submit button
strAction = Request.Form("Submit")
blnSent = false
'Response.Write Request.Form
If strAction <> "" Then
' Make sure the Email field has something in it. For now just put something in it if it's blank.
strEmail = Request.Form("Email")
if strEmail = "" then
strEmail = "BLANK@imahero.com"
End If
' Convert radio button number to text for age.
If Request.Form("Permission") = "1" Then
strPermission = "Yes"
Else
strPermission = "No"
End If
' Convert radio button number to text for brochure type.
Select Case Request.Form("Type")
Case "2"
strType = "Retail"
Case "3"
strType = "Educator"
Case "4"
strType = "Both"
Case Else
strType = "unchecked"
End Select
' Build the body of the message.
txtBody = "Hello from " & Request.Form("Name") & vbCrLf
txtBody = txtBody & "Are you at least 13 years old? " & strPermission & vbCrLf
txtBody = txtBody & "What type of brochure would you like? " & strType & vbCrLf
txtBody = txtBody & "Your comment: " & Request.Form("Comments") & vbCrLf
txtBody = txtBody & "Address1: " & Request.Form("Address1") & vbCrLf
txtBody = txtBody & "Address2: " & Request.Form("Address2") & vbCrLf
txtBody = txtBody & "City: " & Request.Form("City") & vbCrLf
txtBody = txtBody & "State: " & Request.Form("State") & vbCrLf
txtBody = txtBody & "Zip: " & Request.Form("Zip") & vbCrLf
txtBody = txtBody & "Country: " & Request.Form("Country") & vbCrLf
txtBody = txtBody & "Email: " & Request.Form("Email") & vbCrLf
txtBody = txtBody & "Telephone: " & Request.Form("Telephone") & vbCrLf
dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = "brochure@imahero.com"
objCDO.From = strEmail
objCDO.Subject = "Request a Brochure"
objCDO.Body = txtBody
objCDO.Send
blnSent = true
End If
%>