Microsoft Access Email FAQ - CDO aka CDONTS

Last updated 09/27/2010

If you are using Windows NT 4.0 or newer as an OS then you can use CDONTS. It uses the SMTP Service to send mail directly. However the SMTP service must be running on the machine and the machine must have internet access.  You add a reference to Microsoft CDO for NTS Library or Microsoft CDO Library in Access.:

Dim oEMail As New CDONTS.EMail

oEMail.From "anyname@anydomain.com"
oEMail.To "youremail@yourdomain.com"
oEMail.BodyFormat = CdoBodyFormatText
oEMail.Body = "Insert some useful text here"
oEMail.Importance = CdoHigh
oEMail.AttachFile "C:\filename.txt"
oEMail.Send

This technique is frequently used by ASP or ASP.NET or other software running on MS IIS.

Also see E-Mail to Multiple Recipients Using CDO Object at Candace Tripp's Visual Basic and MS Access Downloads down a ways on the page.  Or to download the zip file directly click on E-Mail to Multiple Recipients Using CDO Object

Collaboration Data Objects, version 1.2.1

Beginning in Exchange Server 2007 and Outlook 2007, CDO 1.2.1 will no longer be provided as a part of the install of the product. As a result, there is functionality missing that many applications depend upon. CDO 1.2.1 is a package providing access to Outlook-compatible objects through a COM-based API.

Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1

Starting with Exchange 2007, neither the Messaging API (MAPI) client libraries nor CDO 1.2.1 are provided as a part of the base product installation. As a result, there is functionality missing that many applications depend on. Microsoft Exchange MAPI and CDO 1.2.1 provide access to these APIs

[ Email | Access Tips | Access | Main ]

Auto FE Updater   Auto FE Updater distribute new and updated Front End databases to your users with several mouse clicks.

Wrench and gear Granite Fleet Manager - the best designed fleet maintenance tracking and management system available

Comments email Tony  Search Contact Tony's Blog Privacy Policy Table of Contents

Website copyright 1995-2013 Tony Toews