none
Using CDO to Email - Runtime error RRS feed

  • Question

  • I've established a CDO procedure that keeps failing with error 80040213 at run-time:

    "transport failed to connect to server".

    I believe I provided for all of the necessary attributes (via config fields) to make a valid email message.
    The only thing of question is the SMTP Port number....that is not being exposed anywhere in the Outlook Account properties.
    I tried all of the popular ones: 25, 587, etc.

    The other issue is this account setting : Use Cached Exchange Mode = True
    I have no idea what CDO property/config setting that relates to.

    Here is another one: Encrypt data between Microsoft  Outlook and Exchange = true

    Here are the field item settings that I set from parameter values:

      .Fields.Item(cdoSendUsingMethod).Value = 2
      .Fields.Item(cdoSMTPServer).Value = pszSMTPServerURL
      .Fields.Item(cdoURLProxyServer).Value = pszSMTPProxyServerURL
      'Server port
      .Fields.Item(cdoSMTPServerPort).Value = pSMTPServerPortNum
      .Fields.Item(cdoSMTPAuthenticate) = cdoBasic ' NTLM=2 Anonymous=0
      .Fields.Item(cdoSendUserName) = pszFrom
      .Fields.Item(cdoSendPassword) = pszPassword 
      .Fields.Item(cdoSMTPUseSSL) = pbUseSSL
      .Fields.Item(cdoSMTPConnectionTimeout) = pTimeOut

    What else should I be setting here ?

    Friday, October 11, 2013 2:43 PM