Example Apps for Businesses, Schools & Developers

Version 2408           Approx 0.5 MB                 First Published 11 Feb 2015                 Last Updated 21 Aug 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).

As CDO does not make any use of Outlook, it will continue to work even after Microsoft drops support for 'classic' Outlook in the next few years.

EMailTesterMainForm
All standard email features are included. For example:
a)   It can be used to send HTML emails as well as plain text.
b)   You can optionally add one or more email addresses in the Copy to (cc) and Blind Copy to (bcc) fields. Separate multiple addresses with a semicolon (;)
      Send a copy of the email to yourself for future reference
c)   You can change the sender email address shown to the recipient e.g. to use a no-reply@ ... address
d)   One or more attachments can optionally be included.
e)   The email Importance setting can also be changed from Normal to High / Low
f)   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, two hyperlinks, two inline images, an attached file and High Importance

HTMLMsg
NOTE:
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.

A forthcoming update will use modified code for inline images giving a better chance of these being visible to the recipient


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

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

emailtester3
A PDF Help file is supplied which explains the meaning of all error messages that may occur. Click the Help button to view the help file.

HelpFile

HelpFile2

HelpFile3


NOTE:

1.   This application is compatible with both 32-bit & 64-bit versions of Access (2010 or later)

2.   Google has added additional security to GMail which effectively blocks email sent from any app it considers less secure (including Outlook / Access).
      See Appendix A in 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
v2406           26/06/2024     Added importance settings. Added extra image & two hyperlinks to HTML email. Updated Help file
                                          Reinstated the CDO reference library to handle Importance level
v2408           21/08/2024     Added cc and bcc email options




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



Download

      Click to download:   CDO EMail Tester v2408     (zipped)



Feedback

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 21 Aug 2024



Return to Example Databases Page




Return to Top