As described in script.
2011-11-22 (first published: 2008-03-19)
5,833 reads
As described in script.
-- I found something interesting if you ever want to send multiple reports using sp_send_dbmail -- You have to first set the rowcount to 0 (zero). -- There can't be a space after the semi-colon that separates the full pathnames for the reports. SET ROWCOUNT 0 EXEC msdb.dbo.sp_send_dbmail @profile_name = 'Your_Server_Profile', @recipients = 'recipient.1@xyz.com; recipient.2@xyz.com', @body = 'Reports 1 and 2 are attached', @file_attachments = 'C:\Report Folder\Report1.TXT;C:\Report Folder\Report2.TXT', @subject = 'Reports 1 and 2 are attached' ; -- I did not see anything about this in BOL