SQL Server – Send Mail Using SP_Send_DBMail

In our previous post we have discussed about how to configure SQL Server Database Mail. Once the database mail (dbmail) is configured that dbmail profile can be used in TSQL queries or stored procedures to send e-mails to specified recipients. When you successfully issue a sp_send_dbmail command the mail will be queued in the Database Mail queue and returns a mailid value as message. sp_send_dbmail stored procedure is available in the msdb database.