Customizing Database Mail Default Messages

  • I use database mail to notify me upon success/failure of jobs. I know I could use stored procedure to send dbmail with a custom message, but I was hoping to find a way to change the default message that is sent upon job success failure. Typically, the emails look like:

    JOB RUN:' ' was run on 12/17/2007 at 3:00:00 AM

    DURATION: 0 hours, 04 minutes, 25 seconds

    STATUS: Succeeded

    MESSAGES: The job succeeded. The Job was invoked by Schedule 1 (Schedule 1). The last step to run was Step 1 (Step 1).

    Is their an XML file, SP, or something I can modify to change the message that is sent? If so, where is it? Thanks in advance...

    BC

  • Hi Everyone,

    I ended up figuring out a workaround myself. If anyone else needs to do this, add an insert trigger to msdb.dbo.sysjobhistory and write a script to use sp_send_dbmail to specify your message...

    BC

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply