%@Language="VBScript"%>
<% Option Explicit%>
<%
Dim tt
tt = Request.QueryString("ref")
If request.form("subButton") = "Submit Information" Then
' Declare our information variables and set their values
Dim ln, fn, ad, ci, st, zi, hp, wp, op, em, ct, pg, hr, ot, cmt
tt = Request.Form("url")
If Len(tt) <= 0 Then tt = "index.asp"
ln = Request.Form("lname")
fn = Request.Form("fname")
ad = Request.Form("address")
ci = Request.Form("city")
st = Request.Form("state")
zi = Request.Form("zip")
hp = Request.Form("hphone")
wp = Request.Form("wphone")
op = Request.Form("ophone")
em = Request.Form("email")
ct = Request.Form("contact")
pg = Request.Form("programs")
hr = Request.Form("hear")
ot = Request.Form("other")
cmt = Request.Form("comments")
Response.Cookies("texascounty") = Now()
Response.Cookies("texascounty").Expires = Date + 365
'Declare a couple of variables
Dim myMail, myBod, objConfig, Fields
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = "http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword = "http://schemas.microsoft.com/cdo/configuration/sendpassword"
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.mozarks.com"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "info@mozarks.com"
.Item(cdoSendPassword) = "mozarks"
.Update
End With
Set myMail = Server.CreateObject("CDO.Message")
Set myMail.Configuration = objConfig
myBod = "Thank you for your interest in Bolivar Technical College. The following information was submitted:" & VbCrLf & VbCrLf
myBod = myBod & "Name: " & fn & " " & ln & VbCrLf
myBod = myBod & "Address: " & ad & VbCrLf
myBod = myBod & "City: " & ci & VbCrLf
myBod = myBod & "State: " & st & VbCrLf
myBod = myBod & "Zip: " & zi & VbCrLf
myBod = myBod & "Home Phone: " & hp & VbCrLf
myBod = myBod & "Work Phone: " & wp & VbCrLf
myBod = myBod & "Other Phone: " & op & VbCrLf
myBod = myBod & "Email: " & em & VbCrLf & VbCrLf
myBod = myBod & "Best time to contact you is: " & ct & VbCrLf & VbCrLf
myBod = myBod & "Program(s) you are interested in: " & pg & VbCrLf & VbCrLf
myBod = myBod & "You heard about us from: "
If hr = "other" Then
myBod = myBod & ot & VbCrLf & VbCrLf
Else
myBod = myBod & hr & VbCrLf & VbCrLf
End If
myBod = myBod & "Comments: " & cmt & VbCrLf & VbCrLf
myBod = myBod & "Thank you once again. A representative will be in touch with you shortly concerning your request."
myMail.From = "info@bolivarcollege.org"
myMail.To = em
myMail.Bcc = "info@bolivarcollege.org"
myMail.Subject = "Bolivar Technical College Information Submission"
myMail.TextBody = myBod
myMail.Send
'Clean up
Set myMail = Nothing
Set objConfig = Nothing
Set Fields = Nothing
'We redirect to the final page, tagging the result in the query string to use
'to let the user know the results of the signup process on the final page.
Response.Redirect(tt)
End If
%>
interior