%
Response.Buffer = True
' Check whether the form has been sent for processing (i.e. the
' hidden process field was received); if so, check for submission
' errors
If Request.Form.Count > 0 Then
Dim title, name, email, address, phone, comments, errors_found, submitted
' Set up some code-friendly variables for form fields sent
' from the submitted form
title = Request.Form("title")
name = Request.Form("name")
email = Request.Form("email")
address = Request.Form("address")
phone = Request.Form("phone")
comments = Request.Form("comments")
' If any submitted fields are blank, set the errors_found flag
' to true
If name="" or email="" or address="" Then
errors_found = True
End If
End If
If Request.Form.Count > 0 And Not errors_found Then
submitted = True
Else
submitted = False
End If
%>
| |
|
|
|
| |
<%
' If no errors were found in submission, display a success
' message
If submitted Then
Dim strMailTo, strMailFrom, strSubject, strBody
strMailTo = "koberle@tppkc.com"
strMailFrom = email
strSubject = "TPP contact submission on " & Date
strBody = "The following contact information was received on the TPP Web site on " & Date & " at " & Time & ":" & vbCrLf & vbCrLf
strBody = strBody & "-------------------------------------------------------------------------" & vbCrLf
strBody = strBody & "Title: " & title & vbCrLf
strBody = strBody & "Name: " & name & vbCrLf
strBody = strBody & "E-mail: " & email & vbCrLf
strBody = strBody & "Address: " & address & vbCrLf
strBody = strBody & "Phone: " & phone & vbCrLf
strBody = strBody & "Comments: " & comments & vbCrLf
strBody = strBody & "-------------------------------------------------------------------------" & vbCrLf & vbCrLf
strBody = strBody & "This is an automated message. Please do not reply."
If strMailFrom <> "" Then
sendCDOEmail strMailTo, strMailFrom, strSubject, strBody
End If
Response.Redirect "contact_ty.html"
Else
%>
<%
End If
%>
|
|
|
|