Does anyone happen to know if Microsoft has any plans to drop support for "Microsoft CDO for Windows 2000 Library", as currently found in Windows 10 64bit systems via the normal VBA references?
Thanks,
Bill
Does anyone happen to know if Microsoft has any plans to drop support for "Microsoft CDO for Windows 2000 Library", as currently found in Windows 10 64bit systems via the normal VBA references?
Thanks,
Bill
Not that I'm aware of. However, there is no longer any need to use the library when sending email using CDO. The functionality has been built into standard Access libraries since at least A2007.
I use CDO for all email from Access and have never used that library
I would infer from that then, that Access itself has an implied dependency and were Windows to suddenly drop support for CDO functionality that Access itself would cease to be downward compatible. That happened with Microsoft PhotoDraw with Windows 10, but that app was never mainstream as is Access. I will give it a go.has been built into standard Access libraries since at least A2007
Sorry but I don't understand the point you are making. Support for CDO is built in to one of the standard Access reference libraries. It is therefore likely to remain available for the foreseeable future.
My first attempt to use CDO has failed. First my code and the error I get with that.
The above code gets "this" error:Code:Option Compare Database Option Explicit Public Sub SendSimpleCDOMail() Dim mail As CDO.MESSAGE Dim config As CDO.Configuration Set mail = CreateObject("CDO.Message") Set config = CreateObject("CDO.Configuration") config.Fields(cdoSendUsingMethod).Value = cdoSendUsingPort config.Fields(cdoSMTPServer).Value = "smtp.googlemail.com" config.Fields(cdoSMTPAuthenticate).Value = cdoNTLM config.Fields(cdoSendUserName).Value = "wcsReno@gmail.com" config.Fields(cdoSendPassword).Value = "#Logjam3538" config.Fields(cdoSMTPServerPort).Value = 25 '465 config.Fields(cdoSMTPUseSSL).Value = True config.Fields.Update Set mail.Configuration = config With mail .To = "graeaglebill@gmail.com" .From = "wcsReno@gmail.com" .Subject = "First email with CDO" .TextBody = "This is the body of the first plain text email with CDO." '.AddAttachment "C:\path\to\a\file.dat" .Send End With Set config = Nothing Set mail = Nothing End Sub
Then, I downloaded Colin's tester and had errors with it as well:
I've tried "SMTP.GoogleMail.Com" and "SMTP.Gmail.Com" plus ports 25 and 465. The latter is what Thunderbird uses. Also, Thunderbird gmail settings uses SLL for security. At gmail, I've allowed "less secure apps" to access my gmail account.
What else might I try?
Bill
Please click the Help button and read the help file that accompanies my CDO app. It explains what all the error codes mean so you can fix them.
Page 4 of the Help file deals with GMail security. There are two methods of achieving the required security. I strongly recommend using the SetAppPassword approach
Also remove the quotes in the EMail Server box
Ah yes, the example threw me off a bit. The test worked as desired after I removed the quotes and reverted back to the 465 port address.
I'll look into the gmail SetAppPassword in the AM.
EDIT: I made the same changes to my code plus set the SMTPAuthenticate to use SLL and it executed just like Colin's test did.
Last edited by GraeagleBill; 05-07-2021 at 11:35 PM.
Glad you got it working.
Sorry about the quotes. Its been like that for over 8 years without anyone commenting. I'll alter it.
I think you meant SSL.
Using SetAppPassword with GMail works well for me
Last edited by isladogs; 05-08-2021 at 06:09 AM.
Yes. (it was late when I typed the edit, so the "sand-man" had his way with me )I think you meant SSL.
BTW, for simple plain text, it's easy to see how a simple text box or memo control can be used to create the body of an email, but what about HTML where one might want to embed an image. What type of Access control comes into play in those cases?
EDIT: I did run your tester, but the banner did not display when the email arrived. The png banner file is in the app's directory, so that's not the problem.
Look at the TestHTMLEmail procedure in frmStart to see how I add images to HTML mail.
However, although you can use inline images in HTML emails, these days many email apps block such images by default e.g. Outlook.
Several other apps won't even allow you the option of displaying them e.g. Windows Mail, GMail. This is what happened to you.
Where images are blocked you may see a small red X or nothing at all.
As a result, I suggest you don't use inline images. Just attach any images to the email
Thunderbird doesn't have those restrictions. I send and receive emails daily with embedded images, but yes Windows email and Outlook block them. With perhaps one of the apps, where I'd like to switch to using CDO, the preponderance won't involve images and if an unforeseen situation arises I'll just do as you suggest and send the images as attachments.
Did you essentially create your own email client with a CDO backbone?
Many of my commercial apps include a CDO email feature. That's not the same as a full email client app
This can be used by clients to send bulk emails e.g. to all parents/carers of school students or to send email to customer support - as in the screenshot
My tester app is based on the form provided for clients to setup the feature for their own environment
NOTE: One important point. Access does not keep a copy of emails it sends using CDO.
If you need to keep the mail for future reference, send a copy to yourself. I build that option into my apps
Thanks with all your help with CDO. I can study your tester code regarding HTML as I venture more into adopting CDO into a couple of my apps. I won't get to do anymore for a couple of days, but I think the OP is clearly answered.
Thanks again,
Bill