Example Apps for Businesses, Schools & Developers

Version 2401           Approx 0.5 MB                 First Published 11 Feb 2015                 Last Updated 12 Jan 2024

UPDATED version with additional functionality

This app is used to test / troubleshoot sending emails directly from Access without using Outlook.

It allows users to test the settings for sending emails from Access using collaborative data objects (CDO).

It can be used to send HTML emails as well as plain text. One or more attachments can optionally be included.

There is an option to include the email settings in the body of the email (with or without the password). For example with a plain test email:

Plain Msg + Settings
This is an example HTML email message sent by the application including formatted text, an inline image and an attached file

Although images can be included in any HTML email, many email programs block these by default for security reasons.
Whilst some email programs such as Outlook will allow you to approve the images, it is often both simpler and more reliable to include images as attachments.

If the settings are correct, you will see this message after the Send E-Mail button is clicked.

If there are issues, error messages are displayed to assist with fixing the problem(s).

A Help file is supplied which explains the meaning of all error messages that may occur.





1.   This application is compatibile with both 32-bit & 64-bit Access

2.   Google has added additional security to GMail which effectively blocks email sent from any app it considers less secure (including Outlook / Access).
      The supplied Help file includes details of two solutions, both of which require a change in the security section of your Google account settings

Version History

Version         Date               Notes
v1502           11/02/2015     Initial release
v1903           06/03/2019     Updated code for compatibility with both 32-bit & 64-bit Access
v1908           18/08/2019     Added support for HTML email. Updated to support STARTTLS
v2105           08/05/2021     Minor changes to main form. Updated help file for handling GMail security
v2201           10/01/2022     Updated code to handle UTF-8 encoding (required for sending email in non-Latin scripts such as Arabic.
                                          Thanks to @alvingenius (Motaz Hakim) for alerting me to the issue and providing the code modification required.
v2211           14/11/2022     Fixed a minor error in the SendEMail code
v2312           15/12/2023     Added comment about the validity of using STARTTLS in the SendEMail code
v2401           09/01/2024     Restored missing code line in SendEMailCDO which caused invalid SendUsing error in v2312. Updated Help file
                                          Options to modify subject line & include email settings / password in email body. Added hex values to error messages
                                          Removed the STARTTLS code which had no effect

Further Reading

      Philipp Stiefel :     Sending Emails from Access with VBA and CDO       (note his explanation about STARTTLS and CDO - updated 2024-01-11)

      Philipp Stiefel :     The Mystery of the STARTTLS command in the CDO library – Or: SmtpUseSsl Explained       NEW 2024-01-12


      Click to download:   CDO EMail Tester v2401     (zipped)


Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.

Please also consider making a donation towards the costs of maintaining this website. Thank you

Colin Riddington           Mendip Data Systems             Last Updated 12 Jan 2024

Return to Example Databases Page

Return to Top