I have a simple html email form that is processed with an ASP script using the POST method, that should redirect to an html thank you page upon successful submission of the form. All three pages currently reside on a server and the site is live, so I am accessing the form from the live website to test it. The ASP script currently uses my own email address for testing purposes. I do not receive the emails, which I'm sure you've figured out.
When I hit the submit button I get an HTTP 500 Internal Error message that says the "Website cannot diplay the page." I've talked to the hosting company and they assure me that permissions are set correctly.
I've been troubleshooting this form for weeks and have gone from specific script/syntax errors to the HTTP 500 server error, and have hit a brick wall. If anyone can tell me what I've done wrong or need to do to fix the script I would greatly appreciate it. Here is my ASP script page...
Expand|Select|Wrap|Line Numbers
- <%@LANGUAGE="VBSCRIPT"%>
- <%
- Dim objConfig ' As CDO.Configuration
- Dim objMessage ' As CDO.Message
- Dim Fields ' As ADODB.Fields
- Dim contact, company, email, phone, businessType, comments
- contact = Request.Form("contact")
- company = Request.Form("company")
- email = Request.Form("email")
- phone = Request.Form("phone")
- businessType = Request.Form("businessType")
- comments = Request.Form("comments")
- ' Get a handle on the config object and it's fields
- Set objConfig = Server.CreateObject("CDO.Configuration")
- Set Fields = objConfig.Fields
- ' Set config fields we care about
- .Item(cdoSMTPServer) = "mail.xyz.com"
- .Item(cdoSMTPServerPort) = 25
- .Item(cdoSMTPConnectionTimeout) = 10
- .Item(cdoSMTPAuthenticate) = cdoBasic
- .Item(cdoSendUserName) = "emailcontactus@xyz.local"
- .Item(cdoSendPassword) = "emailus101"
- Set objCDOMail = Server.CreateObject("CDO.NewMail")
- Set objMessage.Configuration = objConfig
- objCDOMail.To = "jennifer@jlpgraffix.com"
- objCDOMail.From = "contactus@reimbconcepts.com"
- objCDOMail.Subject = "SMTP Relay Test"
- objCDOMail.HTMLBody = "Contact: " & Request.Form("contact") & vbCrLf & "Company: " & Request.Form("company") & vbCrLf & "Email: " & Request.Form("email") &_
- "Phone: " & Request.Form("phone") & vbCrLf & "BusinessType : " & Request.Form("businessType") & vbCrLf & "Comments: " & Request.Form("comments")
- objCDOMail.Send
- Set Fields = Nothing
- Set objCDOMail = Nothing
- Set objConfig = Nothing
- Response.Redirect "mailSuccess.html"
- %>