Database Mail SQL 2005 Mail Subject

  • Does anyone know how to change the mail subject? Default is "SQL Server Message" and I would like to be able to set it up so that in the message subject it is unique to each type of notify. It may be right in front of me and I am at complete saturation but any help would be great.

  • Use the @subject parameter:

    exec

    msdb..sp_send_dbmail @profile_name='DBMail',@recipients = 'sql.administrators@company.com',@body = @msg, @subject = 'New Subject Line'

     

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

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