I am working on a classic ASP and Vbscript site that uses CDO.Message to send email to a function. I'm having problems with this function and I get an error,
CDO.Message.1 error '80040213'
The transport failed to connect to the server.
I believe this is due to the SMTP authentication settings and the shared host we are working on. I am looking for help by debugging the problem further.
Here is the main code snippet from the function,
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.<website>.com"
'.Item(cdoSMTPServerPort) = 25
'.Item(cdoSMTPConnectionTimeout) = 10
'.Item(cdoSMTPAuthenticate) = cdoBasic
'.Item(cdoSendUserName) = "support"
'.Item(cdoSendPassword) = "password"
.Update
End With
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.To = lEmailTo '"Display Name <email_address>"
.From = lEmailFrom '"Display Name <email_address>"
.Subject = lSubject
.TextBody = lMessage
.Send
End With
At first, I thought it might have been with comments 9-13 in the above snippet, but it looks like the previous developer specifically commented on them and that the email function was still working at some point in time. Uncommenting these lines still does not resolve the error.
- -, ? - , CDO.Configuration SMTP ? ?