I am trying to use the inbuilt object within Access VBA to send an email. This has worked in very well over the years but in recent years it has begun to fail. My current setup is:-
Microsoft Access 2013 (full)
I'm running the following line of code which is resulting in error 2293 Can't Send This E-Mail Message...
Dim SecurityManager As New AddInExpress.OutlookSecurityManager
SecurityManager.DisableSMAPIWarnings = True
Call DoCmd.SendObject(acSendNoObject, , , "firstname.lastname@example.org", , , "Test Email", "Email Body Text", True)
SecurityManager.DisableCDOWarnings = False
Interestingly, if I run this code with Microsoft Outlook closed, nothing happens - there is no error message but no email is sent either. It is only when Outlook is open I get the error message.
Also interesting is that elsewhere in the program I automate Outlook using the CreateObject (or GetObject) methods and these also work fine. The Security Manager should knock any warning messages that look like the following (although at this stage the security warning would be preferable to the error message):-
However, now I just get an error regardless of whether the Security Manager is on or off.
I can't quite understand how a suite (such as the Office suite) can have a security issue that stops it from working.
Your input is eagerly sought.