I have setup a profile and account for sending mail using DatabaseMail. I have a SQL JOB. If the job fails, I receive an Email
Till this point, everything works fine. This is what the email looks like :
JOB RUN: 'testjob' was run on 3/7/2014 at 4:50:00 PM DURATION: 0 hours, 0 minutes, 0 seconds STATUS: Succeeded MESSAGES: The job succeeded. The Job was invoked by Schedule 10 (s1). The last step to run was step 1 (run).
Now what I want is, if the job fails for any reason, that error message should appear in the email message body.
for example, FK_Constraint error , Conversion errors or any error that caused my sql job to fail.
Is this possible ?