+ Reply to Thread
Results 1 to 2 of 2

VBA CDO XP Firewall / Transport Failed Connect Server

  1. #1

    VBA CDO XP Firewall / Transport Failed Connect Server

    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 = "[email protected]"
    .From = "[email protected]"
    .Subject = "Email subject"
    .HTMLBody = "Email body"
    .Send
    End With
    Set iMsg = Nothing
    Set iConf = Nothing
    End Sub


  2. #2
    Ron de Bruin
    Guest

    Re: VBA CDO XP Firewall / Transport Failed Connect Server

    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


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



    <[email protected]> wrote in message news:[email protected]...
    > 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 = "[email protected]"
    > .From = "[email protected]"
    > .Subject = "Email subject"
    > .HTMLBody = "Email body"
    > .Send
    > End With
    > Set iMsg = Nothing
    > Set iConf = Nothing
    > End Sub
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1