Database Mail External Program
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
The Database Mail external executable is DatabaseMail.exe, located in the MSSQL\Binn directory of the SQL Server 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 SQL Server.
In this Topic:
When the external program starts, the program connects to SQL Server 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 database. If the external program cannot communicate with SQL Server, 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.
Notice that, for efficiency, the external program caches account and profile information. Therefore, configuration changes to accounts and profiles may not be reflected in the external program for a few minutes.