VBA CDO XP Firewall / Transport Failed Connect Server

D

dig314

This code works when the Firewall ( XP sp2 / Excel 2002 ) is OFF. It
will not run while the Firewall is turned on. The error message is:
The transport failed to connect to the server.
The error message occurs at the .Send line.

What Exceptions should I add to the Firewall ?

Thank you for your assistance.

Dig

****************************************************

Sub CDO_Send_Email()
Dim iMsg As Object
Dim iConf As Object
Dim Flds As Variant

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") =
strSMTPserver

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

With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Email subject"
.HTMLBody = "Email body"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub
 
R

Ron de Bruin

Hi Dig

I am running Trend Micro now and have add Microsoft Excel to the exeption list
Try this with the XP firewall also

I can't test it now for you.
Post back with the results please
 

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


Top