Friday, May 9, 2014

Query to Send Mail in SQL Server 2012

Categories:

This is an example query how to send mail using SQL Server 2012. Before try this, you must set your profil default of mail server that used as sender in SQL Server (you can read about this here).

EXEC msdb.dbo.sp_send_dbmail       
        @recipients='thoriq.aziz@technosoft.co.id',   -- recipient of mail 
        @subject = 'MAKAN',                           -- subject mail
        @body = 'Content',                            -- content mail
        @body_format = 'HTML' ;

Spread The Love, Share Our Article

Related Posts

No Response to "Query to Send Mail in SQL Server 2012"

Post a Comment