CDO_send can't communicate with smtp server

A

Art Parra

The following code has been running for several months but now it fails
to send with the following error:

"The transport failed to connect to the server"

My smtp server appears to be ok because I can send mail, maybe a MS
security patch?

thanks,

Sub CDO_Send_Chart()


Dim iMsg As Object
Dim iConf As Object
Dim wb As Workbook
Dim WBname As String

Application.ScreenUpdating = False


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my smtp mail server"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

'Check out the Tips section if you want to change the .To and .TextBody
With iMsg
Set .Configuration = iConf

.To = "mylist"
.CC = ""
.BCC = ""
.From = "me"
.Subject = "my subject"
.TextBody = "some text"
.AddAttachment "D:\Public\mychart.gif"
.Send
End With


Set iMsg = Nothing
Set iConf = Nothing

End Sub
 
R

Ron de Bruin

Hi Art

Maybe you Firewall is blocking it


--
Regards Ron de Bruin
http://www.rondebruin.nl



The following code has been running for several months but now it fails to send with the following error:

"The transport failed to connect to the server"

My smtp server appears to be ok because I can send mail, maybe a MS security patch?

thanks,


Sub CDO_Send_Chart()


Dim iMsg As Object
Dim iConf As Object
Dim wb As Workbook
Dim WBname As String

Application.ScreenUpdating = False


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my smtp mail server"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

'Check out the Tips section if you want to change the .To and ..TextBody
With iMsg
Set .Configuration = iConf

.To = "mylist"
.CC = ""
.BCC = ""
.From = "me"
.Subject = "my subject"
.TextBody = "some text"
.AddAttachment "D:\Public\mychart.gif"
.Send
End With


Set iMsg = Nothing
Set iConf = Nothing

End Sub
 
R

Ron de Bruin

Hi Art

I have changed my settings in the Trend-Micro firewall to avoid your error for example.
I don't believe you have to change the settings in the XP firewall ?

--
Regards Ron de Bruin
http://www.rondebruin.nl



The following code has been running for several months but now it fails to send with the following error:

"The transport failed to connect to the server"

My smtp server appears to be ok because I can send mail, maybe a MS security patch?

thanks,


Sub CDO_Send_Chart()


Dim iMsg As Object
Dim iConf As Object
Dim wb As Workbook
Dim WBname As String

Application.ScreenUpdating = False


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my smtp mail server"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

'Check out the Tips section if you want to change the .To and ..TextBody
With iMsg
Set .Configuration = iConf

.To = "mylist"
.CC = ""
.BCC = ""
.From = "me"
.Subject = "my subject"
.TextBody = "some text"
.AddAttachment "D:\Public\mychart.gif"
.Send
End With


Set iMsg = Nothing
Set iConf = Nothing

End Sub
 
A

Art Parra

Ron,
First, let me thank you for your code, it has worked like a champ for a
long time.
I'm running Windows 2000 Pro and to my knowledge I don't have any
firewall setup on the workstation. Is there a way to test the
connection to the smtp server?

thanks,
 
R

Ron de Bruin

Hi Art

Check out with your IT department.
Maybe they close some ports

--
Regards Ron de Bruin
http://www.rondebruin.nl



Ron,
First, let me thank you for your code, it has worked like a champ for a long time.
I'm running Windows 2000 Pro and to my knowledge I don't have any firewall setup on the workstation. Is there a way to test the connection to the smtp server?

thanks,

Ron de Bruin wrote:

Hi Art

I have changed my settings in the Trend-Micro firewall to avoid your error for example.
I don't believe you have to change the settings in the XP firewall ?

--
Regards Ron de Bruin
http://www.rondebruin.nl



The following code has been running for several months but now it fails to send with the following error:

"The transport failed to connect to the server"

My smtp server appears to be ok because I can send mail, maybe a MS security patch?

thanks,


Sub CDO_Send_Chart()


Dim iMsg As Object
Dim iConf As Object
Dim wb As Workbook
Dim WBname As String

Application.ScreenUpdating = False


Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my smtp mail server"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

'Check out the Tips section if you want to change the .To and ..TextBody
With iMsg
Set .Configuration = iConf

.To = "mylist"
.CC = ""
.BCC = ""
.From = "me"
.Subject = "my subject"
.TextBody = "some text"
.AddAttachment "D:\Public\mychart.gif"
.Send
End With


Set iMsg = Nothing
Set iConf = Nothing

End Sub
 
J

Jon Peltier

I was having trouble with a similar routine. I suspected the Windows XP SR2 upgrade,
but if you're running Windows 2000, that probably wasn't it. Now I guess I need to
check ZoneAlarm.

- Jon
_______
 
G

Guest

Hi Ron:
I am trying to use your code, but fails with error message..

"The transport failed to connect to the server"
I tried at home where I use comcast hsi.
--------------------------
With Flds

..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"smtp.comcast.net"

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
----------------


any advice is appreciated. Don't we need a user id + pw to use comcast. I
am on internet assures this?

MVM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Macro email 4
Excel CDO 5
Sending e-mail using CDO 1
Emailing workbook from Excel 3
Email Using CDO - mixed results 7
Excel emailing from spreadsheet 1
Problem in mail attachment when using CDO 3
e-mail help 3

Top