Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How to add need new body lines in sp_send_dbmail.

$
0
0

DECLARE @Test VARCHAR(1000);

SET @Test = CONCAT(@ObjectType, ' ', @SchemaName,'.',@ObjectName,' has been taken action ', @EventType, ' by user ', @Login, ' at ', @ExecutionTime)

 EXEC msdb.dbo.sp_send_dbmail
  @Profile_Name = 'test1,
  @Recipients = 'test@gmail.com',
  @Body = @Test,
  @importance = 'High',
  @sensitivity = 'Confidential',
  @Subject = 'The following object(s) was/were changed',
  @Exclude_query_output = 1;

Anyone know how to add new body lines?


Viewing all articles
Browse latest Browse all 4871


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>