Press "Enter" to skip to content

Sending an E-Mail with SQL Agent Job Outputs

Thomas Rushton shows how to send an e-mail with the outputs of a SQL Agent job:

I came across a need for SQL Server Agent job output to be emailed out to the developer who created the code that the job was running. For various reasons, they don’t necessarily have access to the SQL Server itself – hurrah – but need to see what’s being generated by their scripts in case something goes wrong.

So, I ended up writing this extremely rough and ready SP

Rough and ready, but it works.