Asked by:
CDO trouble on Windows 2016 Server

Question
-
I use CDO in many access apps. It has always worked fine. Except now we have a Windows 2016 server and now it doesn't. This is my first time using Windows Server 2016, does anyone else have this problem?
This UA thread has a sample CDO example that works: http://www.utteraccess.com/forum/index.php?showtopic=1957295
After.. (If blRet Then .Send) it doesn't do anything on for 3 minutes. Access is responsive, but after 3 minutes it finally throws error: -2147220973: The transport failed to connect to the server.
This is not normal behavior on any other OS I've tried this on.
What could be the problem?- Edited by HTHP Monday, April 10, 2017 1:41 PM
Monday, April 10, 2017 1:41 PM
All replies
-
Beginning with Exchange 2007, neither CDO or MAPI were included in default installations, so it may not be installed on that 2016 machine. You can download and install it, of course, or you could use other methods to send email (like Outlook automation)
-- Scott McDaniel, Microsoft Access MVP
Monday, April 10, 2017 1:46 PM -
What other API options do I have? This application is used in an environment where Outlook is not authorized for use on the user computers, that's why CDO was such a great solution. There is software preventing Outlook from running so Outlook Automation fails.Monday, April 10, 2017 2:36 PM
-
I use vbMAPI from everythingaccess.com. Best thing about it is that it always works and there is no Outlook security warnings and no DLL to install. You load the code into your project and use it like you would Automation. The site has great tutorials and code examples.
I've been using this for years because our network blocks the ports that CDO needs and there used to be various versions of Outlook through our company.
Bill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_ProfessionalsMonday, April 10, 2017 2:46 PM -
I just tested vbMAPI. It uses Outlook Automation(If I'm using t he correct term), which won't work because we have software which prevents Outlook from running. Any other ideas?Monday, April 10, 2017 4:08 PM
-
Hi,
Found this old thread at EE, but I can't open the link from work.
Just thought you might be able to take a look. Hopefully, it will lead to something maybe useful.
Cheers!
Monday, April 10, 2017 4:26 PM -
You could directly interact with the SMTP server.
Another thing I did years ago was send e-mail using BLAT.
I've also seen code where people use ShellExecute and SendKeys to send e-mails.
You can also use WinSock, see: http://www.granite.ab.ca/access/email/winsock.htm
What type of e-mails do you need to send? Basic text, HTML, Attachments? This will dictate which alternatives are available to you.
As Scott stated, you could simply download and install CDO: https://www.microsoft.com/en-ca/download/details.aspx?id=3671
Daniel Pineault, 2010-2016 Microsoft MVP
Professional Support: http://www.cardaconsultants.com
MS Access Tips and Code Samples: http://www.devhut.net
- Edited by Daniel Pineault (MVP)MVP Monday, April 10, 2017 5:08 PM
Monday, April 10, 2017 4:59 PM -
I considered trying to get CDO to work on the server. I can't seem to install it while Outlook 2016 is installed. The work around is installing earlier version, and upgrading Office after. Some management users on the machine need to use Outlook, but most users are unauthorized and cannot even run the application. After some research, Microsoft doesn't support CDO running concurrently with Outlook 2010 or higher either. I read something about it interfering with multiple Exchange accounts being used at once, which is what management users use Outlook for.
I need to use HTML, SMTP credentials for each user. Attachments. and to know if the smtp server received the message or if it failed. I store the sent emails in the database itself for users to look back at later.
I'm trying to get vbSendMail to work. Had to register some dlls to get it runing. Now its saying Login not supported by Host, its sample client doesn't have textbox for Port. I created a GUI in Access for it, but get same error when using poSendMail.SMTPPort property to 25 or 587. We have an online exchange server. 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM. Anyone else use vbSendMail?
Monday, April 10, 2017 7:33 PM -
You might want to take a look at the Redemption component. It's been around for a long time and is a wrapper for Extended MAPI.
http://www.dimastr.com/redemption/home.htm
Paul ~~~~ Microsoft MVP (Visual Basic)
Tuesday, April 11, 2017 12:16 PM