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

' 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:"
Set cdoConfig = CreateObject("CDO.Configuration")
Set cdoMessage = CreateObject("CDO.Message") 
With cdoConfig.Fields 
	.Item("") = 2 ' cdoSendUsingPort 
	.Item("") = "" 
	.Item("") = 25
End With
With cdoMessage	
Set .Configuration = cdoConfig			
	.To = Request.Form("email")
	.From = ""
	.Subject = "Enquiry"
	.TextBody = strHTML
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
End With

Set cdoMessage = Nothing 
Set cdoConfig = Nothing


Set objCart=Nothing

Set rsemail = Nothing

Open in new window

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 the same mail server as was used before?  Regardless, is it configured to allow you to send mail through it from the new site?
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("") = 2 ' cdoSendUsingPort 
	.Item("") = "" 
	.Item("") = 25
End With

Open in new window

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:
View this page, to understand how to view your 500 error pages correctly

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
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

From novice to tech pro — start learning today.