Viewing post 1 (of 1 total)
You can also use msdb.dbo.sp_send_dbmail to embed the resultset directly into the body of the email:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'SQL Server Agent Mail Profile'
,@recipients = @to_list
,@copy_recipients = @cc_list
,@body = @msg
...
June 26, 2008 at 9:18 am
#834768