Can it be possible?
I am trying to create a procedure where once it runs, it captures sql server and sql agent logs with error details (e.g I want the email to grab the details of why the backup job failed). Then the error should be send thru msdb.dbo.sp_send_dbmail. I know how to send a generic email where it says such as "Backup Failed, please see the error logs".
I would rather have the error itself sent in the email.