<% if request("task") = "" then %>
<% end if %>
<% if request("task") = "add" then
firstname=(request("firstname"))
lastname=(request("lastname"))
email=(request("email"))
streetaddress=(request("streetaddress"))
streetaddress2=(request("streetaddress2"))
city=(request("city"))
state=(request("state"))
zip=(request("zip"))
phone=(request("phone"))
fax=(request("fax"))
package=(request("package"))
message=(request("message"))
todaydate=now() 'timestamp the email
if firstname="" then
blank="yes"
end if
if lastname="" then
blank="yes"
end if
if email="" then
blank="yes"
end if
if streetaddress="" then
blank="yes"
end if
if city="" then
blank="yes"
end if
if state="" then
blank="yes"
end if
if zip="" then
blank="yes"
end if
if package="" then
blank="yes"
end if
if blank = "yes" then
response.write "YOU HAVE LEFT A REQUIRED FIELD BLANK "
response.write "Click Here to TRY AGAIN "
else
'***************************
'SEND MAIL
'***************************
IP = Request.ServerVariables("REMOTE_ADDR")
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = email
objMail.Subject = "BOOK-A-HUNT REQUEST -- NEBRASKA HUNTING COMPANY -- AUTOMATED"
objMail.To = "scott@binary.net"
objMail.bcc = "nebraskahunting@gmail.com"
objMail.Body = "Sent by: " & firstname & " " & lastname & vbcrlf & vbcrlf &_
streetaddress & vbcrlf &_
streetaddress2 & vbcrlf &_
city & " " & state & " " & zip & vbcrlf &_
"------------------------------------------------" & vbcrlf &_
" Email: " & email & vbcrlf &_
"Phone: " & phone & vbcrlf &_
" Fax: " & fax & vbcrlf &_
"------------------------------------------------" & vbcrlf &_
"Package: " & package & vbcrlf &_
"------------------------------------------------" & vbcrlf &_
"Message: " & message & vbcrlf & "------------------------------------------------" & vbcrlf &_
"Sent by ip address " & IP
objMail.Send
'You must always do this with CDONTS
set objMail = nothing
response.write " Thank You for Booking Your Hunt with Nebraska Hunting Company! "
response.write " Please Confirm Your Booking with a 50% Deposit of the Estimated Total Cost of Your Package "
response.write "Click Here to see our Photo Gallery "
response.write " ------------------------------------------------------------------------------------------------------------------ "
'*****************************
'end send mail stuff
'*****************************
end if
end if %>
|