Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


CDO - Excel 2007 Transport Error

CDO - Excel 2007 Transport Error

CDO - Excel 2007 Transport Error

We have an excel 2007 that emails out PDF invoices. It uses CDO code that has been working fine for the last 2 years using gmail as the email system.

We have now changed to our own website address, and have changed the parameters to those required by the ISP. Have tried ports 25, 465 and 587, but always get the same error:

CDO.Message.1 error '80040213'
The transport failed to connect to the server.

The OS is win10, the local pc has not changed.

Can send mail out on that account using Thunderbird as local client, which has the same smpt account details and port details (465)

CODE -->

If IsEmailValid(eMailAddress) Then
        ' Email section starts here
        Set iMsg = CreateObject("CDO.Message")
        Set iConf = CreateObject("CDO.Configuration")

        iConf.Load -1
        Set Flds = iConf.Fields
        With Flds
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
            .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "treasurer@xxxxxxxx.org.uk"
            .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password_goes_here"
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.xxxxxxxx.org.uk"
            .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
        End With
        strbody = "line1" & vbNewLine & vbNewLine _
                  & "line2" & vbNewLine & vbNewLine _
                  & "line3" & vbNewLine & vbNewLine _
        With iMsg
            Set .Configuration = iConf
            .To = Worksheets("Unpaid General Fees").Range("R" & i).Value
            .CC = ""
            .BCC = ""
            .From = "treasurer@xxxxxxxx.org.uk"
            .Subject = "Invoice for " & Worksheets("Unpaid General Fees").Range("B" & i).Value & (Resent)
            .TextBody = strbody
            .AddAttachment folder + "\" + pdfName
        End With
        ' Email section ends here
        Set iMsg = Nothing
        Set iConf = Nothing
        Worksheets("Unpaid General Fees").Range("T" & i).Value = "eMailed"

        Worksheets("Unpaid General Fees").Range("T" & i).Value = "To Be Posted"
    End If
  End If 

RE: CDO - Excel 2007 Transport Error

It appears the ISP instructions about the server to use were incorrect.

I raised a question with them, and they have come back to apologise and to release a new instruction set.

Now works ok.

Thanks for interest, but, "nothing to see here"

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close