I downloaded the example you mention, I ran it. Nothing happens when I click on any of the buttons "Send Email", "Help", "Quit"
I tried the following, but unfortunately does not send. The xxx, were replaced for valid email addresses.
It tells me "The transport failed to connect to the server"
You will only get the yellow Enable Content security banner if your Macro Settings in the Trust Center are set to the following:It was a problem with the trusted location. I would have expected a message. It now gives one of the errors which appear in the documentation.
Thanks for the obvious solution. Short of BCCing every email, the question still stands "Are the outgoing emails stored somewhere and can they be accessed?"BCC yourself?
No.Thanks for the obvious solution. Short of BCCing every email, the question still stands "Are the outgoing emails stored somewhere and can they be accessed?"
You would be surprised how many people do not think of the 'obvious' solution.Thanks for the obvious solution. Short of BCCing every email, the question still stands "Are the outgoing emails stored somewhere and can they be accessed?"
Many thanks for the reply. The software works right now with Outlook and we want to make it SMPT Client Independent.No.
You would need to use something else like MAPI to write the email to Sent folder on the server. It starts getting complicated in terms of Access/VBA/Windows security settings blocking this. By this stage you may as well use a third-party solution or, even worse, automate Outlook.
BCC'ing yourself is infinitely easier, you can always create a rule in your normal email client to move these emails to a dedicated folder
Indeed, sometimes the obvious solution is not that obvious.You would be surprised how many people do not think of the 'obvious' solution.
They would be useful if I also decide to adopt CDO completely, which is a more professional way to go, since it should not be expected for the user to have Outlook.They aren't in the tester app but I'm happy to share them if they would be useful.
However, it sounds like you've already achieved the same results yourself
Many thanks for the info. I cannot download the attachment, my BitDefender is informing me that the web page is infected.Attached is a zipped .bas file containing most of the module code I used.
I've stripped out a few items that are irrelevant but there is still much you probably won't need.
The code compiles so hopefully it will work as written but I haven't touched it in almost 15 years!
NOTE: I use late binding for anything invoking CDO or Outlook so no additional references are needed
The SendUsing setting is almost always 2 (Network)
The possible values are:
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Two CDO articles you may find helpful:
Sending Emails from Access with VBA and CDO - Codekabinett
VBA - Using CDO Mail To Send E-mails | DEVelopers HUT (devhut.net)
Hope that helps. Ask if you have any other questions