Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 2.87 KB

File metadata and controls

43 lines (31 loc) · 2.87 KB
title Database Mail External Program
description Learn more about DatabaseMail.exe, the Database Mail external program.
author WilliamDAssafMSFT
ms.author wiassaf
ms.date 05/16/2025
ms.service sql
ms.topic conceptual
helpviewer_keywords
external programs [Database Mail]
DatabaseMail90.exe
Database Mail [SQL Server], external programs
monikerRange >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current

Database Mail external program

[!INCLUDE SQL Server SQL MI]

The Database Mail external executable is DatabaseMail.exe, located in the \MSSQL\Binn directory of the [!INCLUDEssNoVersion] installation. Database Mail uses Service Broker activation to start the external program when there are e-mail messages to be processed. Database Mail starts one instance of the external program. The external program runs in the security context of the service account for [!INCLUDEssNoVersion].

Database Mail external program concepts

When the external program starts, the program connects to [!INCLUDEssNoVersion] using Windows Authentication and begins processing e-mail messages. When there have been no messages to send for the specified time-out period, the program exits. You can configure the amount of time that the program waits before exiting by using either Database Mail Configuration Wizard or the Database Mail stored procedures. For more information, see sysmail_configure_sp (Transact-SQL).

The external program stores information in system tables in the msdb system database. If the external program cannot communicate with [!INCLUDEssNoVersion], the program logs errors to the Microsoft Windows Application event log. Additional message logging is provided when the logging level is set to Verbose in the Configure System Parameters dialog box of the Database Mail Configuration Wizard.

For efficiency, the external program caches account and profile information. Therefore, configuration changes to accounts and profiles might not be reflected in the external program for a few minutes.

Configure the Database Mail external program

Configuration Task Topic Link
Specify the time that the External Program runs before exiting. sysmail_configure_sp (Transact-SQL)

Related content