SQL Server provides the ability to send emails via its Database Mail solution.
The actual act of sending mail is done with the sp_send_dbmail
stored procedure. But before you start sending emails from SQL Server, you need to enable and configure Database Mail.
You can do this with the SSMS GUI, or with T-SQL.
This article demonstrates how to do it with T-SQL. It assumes that Database Mail has never been enabled on your system, and therefore it goes through the steps involved in enabling it.
If you prefer to use the SSMS GUI, see How to Setup Database Mail in SQL Server (SSMS).
Continue reading