Query to Send Mail in SQL Server 2012 - thoriqaziz.com

thoriqaziz.com

Do your hobby

Query to Send Mail in SQL Server 2012

Share This
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' ;

No comments:

Post a Comment

Pages