Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email server connection failed

Status
Not open for further replies.

carranz

Technical User
Nov 17, 2006
40
US
We upgraded to Server 2007 for our email. After we upgraded, the application can't connect to server

CDO.Message.1 error '80040213'

The transport failed to connect to the server.
Does anyone know why it will not connect. Has something changed on 2007 server?

Code

Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = Server.CreateObject("CDO.Message")
objMessage.Subject = "Request Form"
objMessage.Sender = ""
objMessage.From = ""
objMessage.To = ""
objMessage.Cc = email
objMessage.Bcc = ""

objMessage.HTMLBody = "System"

'==This section provides the configuration information for the remote SMTP server.

objMessage.Configuration.Fields.Item _
(" = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
(" = "server"


objMessage.Configuration.Fields.Item _
(" = cdoBasic

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
(" = "user"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
(" = "password"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
(" = 25

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
(" = False

'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
(" = 60

objMessage.Configuration.Fields.Update
objMessage.Send
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top