Send Email by using sp_send_dbmail

Posted by Rajnilari2015 under Sql Server category on | Points: 40 | Views : 1075
The below code will do the work

USE msdb
EXEC msdb..sp_send_dbmail
@profile_name='Test Cient',
@recipients=';', @subject='Daily File Report',
@body= 'Please find enclosed the daily file report',

The above code will send email using the sp_send_dbmail of MSDB which will reach to the recipients; with the subject as 'Daily File Report' , the body being 'Please find enclosed the daily file report' and a file attachment 'D:\FileToExport.txt'

Comments or Responses

Login to post response