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