ASP Email send

I recently transferred a site from one host to another and since the transfer the contact form has stopped working, the site is written in ASP which I don't have a lot of experience with so I'm struggling to locate the issue, I've narrowed is down to the .send commands which cause the server to return a 500 error, but further than that I'm at a loss to what is causing the issue, I've attached the full file to look at, in advance thanks for your help
<!--#include file="_connections.asp" -->
<!--#include file="_includes.asp" -->
<% session.LCID = 2057 %>
<%
Dim rsemail
Set rsemail = Server.CreateObject("ADODB.Recordset")
rsemail.ActiveConnection = MM_sqlconn_STRING
rsemail.Source = "SELECT * FROM tblContactEmails"
rsemail.CursorType = 0
rsemail.CursorLocation = 3
rsemail.LockType = 1
rsemail.Open()

' build HTML for message body
strHTML = "Dear " & ChkString(Request.Form("name")) & vbcrlf
strHTML = strHTML & "Thank you for your enquiry, one of our customer service team will contact you back soon." & vbcrlf & vbcrlf
strHTML = strHTML & "Name: " & ChkString(Request.Form("name")) & vbcrlf
strHTML = strHTML & "Email: " & ChkString(Request.Form("Email")) & vbcrlf
strHTML = strHTML & "Request: " & ChkString(Request.Form("request")) & vbcrlf & vbcrlf

strHTML = strHTML & "Company name," & vbcrlf
strHTML = strHTML & "Tel: 0123456789" & vbcrlf
strHTML = strHTML & "Email: me@emailaddress.com"
	
Set cdoConfig = CreateObject("CDO.Configuration")
Set cdoMessage = CreateObject("CDO.Message") 
 
With cdoConfig.Fields 
	.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' cdoSendUsingPort 
	.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mailserver.com" 
	.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
	.update 
End With
With cdoMessage	
Set .Configuration = cdoConfig			
	.To = Request.Form("email")
	.From = "me@emailaddress.com"
	.Subject = "Enquiry"
	.TextBody = strHTML
	'.Send
End With

With cdoMessage	
Set .Configuration = cdoConfig				
	.To = rsemail.fields.item("contact_emails").value
	.From = Request.Form("email")
	.ReplyTo = Request.Form("email")
	.Subject = "Enquiry"
	.TextBody = strHTML
	'.Send
End With

Set cdoMessage = Nothing 
Set cdoConfig = Nothing

response.Redirect("contact-thanks.asp")

Set objCart=Nothing

rsemail.Close()
Set rsemail = Nothing
%>

Open in new window

LVL 1
cpearsonaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Paul MacDonaldDirector, Information SystemsCommented:
Is smtp.mailserver.com the same mail server as was used before?  Regardless, is it configured to allow you to send mail through it from the new site?
0
sammySeltzerCommented:
If you transferred your site from one host to another, there is a pretty good possibility that the new host has a different relay protocol than your previous.

So, basically contact them and ask them to what type of asp email component they use and ask for their sample email component code.

Chances are your issues lie with the code snip below:

With cdoConfig.Fields 
	.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' cdoSendUsingPort 
	.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mailserver.com" 
	.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
	.update 
End With

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Wayne BarronAuthor, Web DeveloperCommented:
#1
View this page, to understand how to view your 500 error pages correctly
http://kb.cffcs.com/Main.asp?irid=13&Type=Article

#2
Chances are, since you moved to another host, you will have to use the new host's mail server, instead of the old host's.

You should find out more, once you view #1 above, and configure yourself to view the error page(s).

Good Luck
Carrzkiss
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.