<%response.buffer = true %>
<%
crlf = chr(13)
quote = chr(34)
indent = " · "
debugme=1
' SET CONFIRMATION EMAIL RESPONSE TEXT
'confirmation_text = " "
'confirmation_text = "
"
' confirmation_text = confirmation_text & " "
'confirmation_text = confirmation_text & "Tu encuesta ha sido enviada con éxito." & "
"
'confirmation_text = confirmation_text & "de Herbalife se pondrá en contacto contigo."
if request.form.Count = 0 then
response.write "No form was sent. Script Terminated."
Response.End
else ' GET FIELDS
' human resources
Myname = request.form("firstname")
Myname1 = request.form("lastname")
Company = request.form("Company")
Address = request.form("Address")
Apt = request.form("Address2")
City = request.form("City")
Mystate = request.form("Mystate")
Zip = request.form("Zip")
Phone = request.form("Phone")
Email = request.form("Email")
Message = request.form("Message")
myresponse=""
myresponse = myresponse & "" & " First Name: " & " " & myname & "
"
myresponse = myresponse & "" & " Last Name: " & " " & myname1 & "
"
myresponse = myresponse & "" & " Company: " & " " & Company & "
"
myresponse = myresponse & "" & " Address: " & " " & Address & "
"
myresponse = myresponse & "" & " Apt: " & " " & Apt & "
"
myresponse = myresponse & "" & " City: " & " " & City & "
"
myresponse = myresponse & "" & " State: " & " " & Mystate & "
"
myresponse = myresponse & "" & " Zip Code: " & " " & Zip & "
"
myresponse = myresponse & "" & " Phone: " & " " & Phone & "
"
myresponse = myresponse & "" & " Email Address: " & " " & Email & "
"
myresponse = myresponse & "" & " Message: " & " " & Message & "
"
end if
DIM body_text
body_text = body_text & ""
body_text = body_text & "Good Earth Plants Contact Form" & "
"
'body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"
body_text = body_text & myresponse & "
"
body_text = body_text & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
if debugme=1 then response.Write body_text
'Dimension variables
Dim objCDOSYSCon
'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Out going SMTP server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.goodeathplants.com"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objCDOSYSCon.Fields.Update
'Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = Request.Form("email")
objCDOSYSMail.To = "tlass@goodearthplants.com"
objCDOSYSMail.Subject = "Good Earth Plants Contact Form"
objCDOSYSMail.HTMLBody = body_text
objCDOSYSMail.Send
' SEND the CONFIRMATION EMAIL <----------------------------
'objCDOSYSMail.From = "tlass@goodearthplants.com"
'objCDOSYSMail.To = Email
'objCDOSYSMail.Subject = "Alcock & McFadden Survey"
'objCDOSYSMail.HTMLBody = confirmation_text
'objCDOSYSMail.Send
'Close the server mail object
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
On Error Resume Next
Select Case Err.Number
Case 0 ' All is well, do nothing
Case 50, 53 ' Standard Path or file not found.
' Create custom error values and raise error back to the system.
intErrorNumber = vbObjectError + 1073
strErrDescription = "File not found or unavailable."
strErrSource = "Read Message File"
Err.Raise intErrNumber, StrErrSource, StrErrDescription
response.write "Error 1"
response.end ' change to Exit Function if inside a function.
Case Else
' Raise the standard error back to the system.
Err.Raise Err.Number, Err.Source, Err.Description
response.write "Other error"
response.write "|" & err.Number & Err.Source & Err.Description
response.end
End Select
if request.form("redirect") <> "" then
response.redirect(request.form("redirect"))
response.write "Redirected here"
end if
%>