transport failed to connect

ellenr

Registered User.
Local time
Yesterday, 20:14
Joined
Apr 15, 2011
Messages
400
One of the users of my db suddenly cannot send email. (Win7, Access runtime 2010). The vba code uses CDO and has been working for a couple of years.

.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'NTLM method
.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
.item("http://schemas.microsoft.com/cdo/configuration/smptserverport") = 465
.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "OrgEmail@gmail.com"
.item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxyyzz"

I took my laptop to their house and couldn't send the email either. Returned home and was able to send the email in question without a problem. I had 4 bars on their WiFi and their email is sending and receiving. They have recently changed their isp to AT&T, which seems to be the only thing different in the whole system. I know there is a problem in some areas sending through Bellsouth, but haven't heard of problems on AT&T. Does anyone out there have any ideas? Thanks.
 
"Transport failed to connect" reminds me of something - that message I received ages ago when siwthing provider but by mistake retaining the old mail server in my code. In that case I tried to send mail from old server while loged in into the new provider, and the atnti-spam measures prevente mails being sent like that.

Could it be that your new provider does not allow sending of mails via third-party servers?
 
That is what I was wondering--I know Bellsouth blocks sending through 3rd party servers, but hadn't run into a case of AT&T blocking them. Is there a workaround if that is indeed my problem?
 
I think I have a clue! I believe UVerse is blocking their outgoing smtp. I think I can get them to unblock for the user, but I have a question. I found the following:

"All e-mail sent via the Internet is routed through port 25. When an e-mail server that runs on your computer delivers messages, it always uses port 25 to transmit data to remote e-mail servers. Therefore, if your ISP is blocking the port, your messages will not get through."​

My CDO is sending through port 465. Do I have to have both port 25 and 465 unblocked? I would have thought only 465 until I read the above quote.
 
One more question on this topic, and hoping someone will reply. If the vba cdo routine uses the user's own server, username and password along with the rest of the settings for their email client, will it allow sending through port 25? The user with the bellsouth problem isn't available at the moment for testing. Has anyone been successful with this approach?
 
With your help many years ago, I was able to solve the email program problem--my users have been successfully using the program all these years. Now, a user has a new computer and can no longer send emails (The transport failed to connect to the server). Troubleshooting with the web host found that telnet was not connected on her computer--fixed that but email still failed. I can send emails successfully as can two other users recently. She is running the same program version. The web host has checked everything they could think of. She hasn't moved or changed internet providers. She has successfully installed the odbc MySql connector and can access all of the MySql data files. All of this seems to point to something in her new computer's system that isn't allowing the cdo code to work. I have run out of ideas. Any help you can give would be appreciated!
 
Welcome back after more than 10 years!.
I suggest you study the help file accompanying my example CDO email tester app as that contains details of all possible CDO errors:


That specific error has several possible causes:
Usually its due to incorrect settings e.g. server address or port wrong. However it is also shown if Use SSL setting or Password is incorrect
 
I've been using bellsouth.net for years, perhaps a couple of decades. I'll support Colin's comment that with port 465 (the encrypted SMTP port), you have to get all of the other security-related settings right or it won't work. It is very touchy. Once you've got it figured out, take good notes in case something else changes down the road a bit.
 
I am confused as to what telnet has to do email?
Surely she gets a specific error code as to why?
 
Welcome back after more than 10 years!.
I suggest you study the help file accompanying my example CDO email tester app as that contains details of all possible CDO errors:


That specific error has several possible causes:
Usually its due to incorrect settings e.g. server address or port wrong. However it is also shown if Use SSL setting or Password is incorrect
isladogs, I know for certain that her password is correct. Several years ago Google disallowed gmail.com email addresses going through third party email servers. In order to circumvent this for my gmail users, I assigned them new ncswga.com email addresses and passwords and set up forwarders back to their gmail account in case there were reply emails. This fix has worked for my own use as well as for numerous others. I next had her try 587 as the port as well as 25--neither worked. She had a group email that needed to go out so I was able to send it using her email address as sender. If her password werent correct I would have received an error. So, the only thing that is different from when she was able to send emails is a new computer. The web server made sure her ip address is white listed. I had her try turning off her firewall temporarily but that made no difference. This new computer is Windows 11 Home. My new computer that has no problem sending email is running Windows 11 Pro. Can you think of setting there that could possibly prohibit connection to the transport?
 
I am confused as to what telnet has to do email?
Surely she gets a specific error code as to why?
Gasman, I have no idea. When I was working with the web server help, that was one thing they checked.
 
Perhaps check event viewer for any clues?
 
Can you think of setting there that could possibly prohibit connection to the transport?

Sorry but I'm still on Windows 10. The only settings I'm aware of are those I cover in my article & example app.

As mentioned, an incorrect password is just one of 4 possible reasons for that error.
If you haven't yet done so, I suggest you study my example app & help file carefully.

The use of port 587 to send CDO emails using TLS is a particular issue which has had a lot of misinformation over the years from many experts (including me). The best explanation is the updated article by Philipp Stiefel - see links in my app.

Also try to send test CDO emails using my app on the problem machine

If it still fails, then try setting an app password (again see my help file) which will allow you to bypass the Google restrictions.
 
I am confused as to what telnet has to do email?

There are a couple of possible (but kind of off-the-wall) associations. TELNET is both a specific connection protocol (that is a subset of TCP/IP) and the name of a utility program. It is one of the simpler protocols. If you don't have TELNET ability, there is the question of whether the TCP/IP "stack" of utilities has been loaded - referring to TELNET in this latter reference as a program. Another side of that coin is that you can actually use TELNET (the program) to test other protocols. I've tested FTP and SMTP manually a few times using the TELNET program.

I am on a Win11 "Home" system. I have not used CDO on this system but the client protocol setup for my Outlook (2021) uses the same sorts of settings as discussed above.

Since the problem appears to be that the transport won't connect to the mail server, you might try a CMD function, though you might need to activate that command prompt via Run As Admin.

Code:
ROUTE PRINT <mail server net address>

If you can run that from both the failing system and one that doesn't fail, see if there is a difference. There shouldn't be, but if there is then the problem is different routing tables.
 
Colin, I am trying your CDOMailTester app. It is basically same code I already tried from other sources and facing same issues for Gmail SMTP. The first link you provide for the Gmail fix has changed content. Says it is no longer possible to set for less secure apps even with 2-factor authentication off. I do not see this option anywhere in my Google/Gmail settings and 2-factor was not active. Maybe this is only for personal accounts.
Starting January 2025, less secure apps, third-party apps, or devices that have you sign in with only your username and password will no longer be supported for Google Workspace accounts.
I am now trying the app password approach. I added app name to password apps in Google Account. I used the password generated by Google and get "successfully sent" message and WOW I got an email. Annoyingly, can't view that password again from Google account.

I tried the smtp-email.outlook.com and that did not work. Most everything I found about using Outlook or Live involves Office365, which I don't have.
 
Last edited:
No, I saved my password, when I had to generate it. I believe you can just generate another though?
 
Colin, I am trying your CDOMailTester app. It is basically same code I already tried from other sources and facing same issues as faced for Gmail SMTP. The first link you provide for the Gmail fix has changed content. Says it is no longer possible to set for less secure apps even with 2-factor authentication off. I do not see this option anywhere in my Google/Gmail settings and 2-factor was not active. Maybe this is only for personal accounts.

I am now trying the app password approach. I added app name to password apps in Google Account. I used the password generated by Google and get "successfully sent" message and WOW I got an email. Annoyingly, can't view that password again from Google account.

I tried the smtp-email.outlook.com and that did not work. Most everything I found about using Outlook or Live involves Office365, which I don't have.

Hi June
My CDO email tester app was originally created to assist my clients set up CDO email from Access n their workplaces.
Since then, I've added additional features like HTML email, Importance etc.
All CDO code is going to be very similar for obvious reasons.

I knew the less secure apps option would be completely disabled at some point.
I stopped using it a long time ago as I have 2-step verification already setup for my GMail accounts.

I still use the app password approach & it has always worked perfectly provided you know your app password! 😀
You need a different app password for each of your GMail accounts

The app password approach will as far as I am aware, continue to work for the foreseeable future.
As Google controls that process, I see no reason why they would ever be likely to block it

CDO will of course continue to work even once New Outlook is imposed on all of us in the next few years.
Who knows - perhaps the A-team will consider updating it in the future? I can only live in hope.
 
Last edited:
No, I saved my password, when I had to generate it. I believe you can just generate another though?
Yes, it's good I have the password in my code and it did occur to me I can just delete and generate another if really came to that.
 

Users who are viewing this thread

Back
Top Bottom