Send E-Mail Without Using SQL Mail in SQL Server (SMTP)

By Bill Graziano on 11 April 2002 | Tags: SQLMail


SQL Mail provides an easy way to send and read e-mail from SQL Server. However, because SQL Mail is a Messaging Application Programming Interface (MAPI) application, a MAPI subsystem must be present on the server. Microsoft Windows 2000 does not provide a MAPI subsystem (Microsoft Windows NT 4.0 installs a MAPI subsystem when you install Windows Messaging). Therefore, in order to use SQL Mail, you must install a MAPI client such as Microsoft Outlook.

You can use other methods to send Simple Mail Transport Protocol (SMTP) e-mail directly from SQL Server such as Collaboration Data Objects for NT Server (CDONTS) or Collaboration Data Objects for Windows 2000 (CDOSYS) in combination with the sp_OA SQL Server OLE Automation stored procedures. This article provides an example of how to use the preceding techniques to send e-mail to an Internet mail server. You can further develop the technique to provide a more robust mailing system. For example, you may want to add error handling code. The methods in the sample do not provide a means for reading or processing e-mail.

Link: Send E-Mail Without Using SQL Mail in SQL Server (SMTP)


Related Articles

Sending SQL notifications with CDOSYS (4 August 2004)

INF: Common SQL Mail Problems (22 October 2002)

Building a Mail Queue System (24 September 2001)

INF: How to Configure SQL Mail (5 September 2001)

Sending SMTP Mail using a Stored Procedure (19 July 2001)

SQLMail in Depth (15 September 2000)

How to set up SQLMail (11 September 2000)

Other Recent Forum Posts

I have installed 2019 MS SQL via powershell but I am not able to open SSMS (3h)

Home page (Web Portal) just spins (21h)

Get the min start and max end when the datetime overlap is more than 1 day (23h)

Query Inner or Sub including 4 tables (23h)

CASE Statement to Categorize Data Request (1d)

How to remove all text inside brackets in sql server and return only text to the left of this (2d)

Get first datetime and last datetime on a single row (2d)

SQL to One to Many (3d)

- Advertisement -