Forum Moderators: open

Message Too Old, No Replies

switched hosting companies and now form won't work.

please help

         

justraquel

3:14 pm on Apr 4, 2004 (gmt 0)

10+ Year Member



I've used the same form for years. I switched hosting companies and not the form won't work. The error message is "Server.CreateObject Failed".

Please help. I've posted the cold below.

%
Dim strBody

dim mail
dim mail2
Set Mail = Server.CreateObject("Persits.MailSender")

Mail.Host = "mail.mamashealth.com" ' Specify a valid SMTP server
Mail.From = "giftcertificate@mamashealth.com" 'Request.Form("SenderEmail")
'Mail.FromName = Request.Form("SenderName") ' Specify sender's name
mail.addaddress "raquelh@mamashealth.com", "Raquel Hunter"
Mail.Subject = "gift certificate"

strBody = "The feedback values here "
strBody = strBody + chr(10) + "------------------------------------------- "
strBody = strBody + chr(10) + "Sender First Name: " & Request.Form("firstname")
strBody = strBody + chr(10) + "Sender Last Name: " & Request.Form("lastname")
strBody = strBody + chr(10) + "Sender Street: " & Request.Form("streetaddy")
strBody = strBody + chr(10) + "Sender City: " & Request.Form("city1")
strBody = strBody + chr(10) + "Sender State: " & Request.Form("state1")
strBody = strBody + chr(10) + "Sender Zip: " & Request.Form("zipcode")
strBody = strBody + chr(10) + "Sender Country: " & Request.Form("country1")
strBody = strBody + chr(10) + "Sender Age: " & Request.Form("age1")
strBody = strBody + chr(10) + "Sender Occupation: " & Request.Form("occ")
strBody = strBody + chr(10) + "Sender Email: " & Request.Form("emailaddy")
strBody = strBody + chr(10) + "Sender Salary: " & Request.Form("houseincome")
strBody = strBody + chr(10) + "Donate: " & Request.Form("answer3")

strBody = strBody + chr(10) + "Sender Info: " & Request.Form("InfoType")
strBody = strBody + chr(10) + "User Agent: " & _
Request.ServerVariables("HTTP_USER_AGENT")
strBody = strBody + chr(10) + "IP: " & _
Request.ServerVariables("REMOTE_HOST")

mail.body = strbody
On Error Resume Next
Mail.Send
If Err = 0 Then
response.write " "
else
Response.Write "Error encountered: " & Err.Description
End If
set mail = nothing

%>

defanjos

3:22 pm on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a common problem when switching hosting companies. What is happening, is that the new host does not have the email component ASPEmail installed.
Go to their web site - or call - and check which email component they use, and change your code accordingly.
They could have CDONTS, ASPMail (different than ASPEmail), etc.

justraquel

4:08 pm on Apr 4, 2004 (gmt 0)

10+ Year Member



thanks a bunch! i fixed it