– Create a Database Mail account

declare @acc_name nvarchar(256), @prof_name nvarchar(256), @operator_name nvarchar(256), @count int

set @acc_name = ‘Mail Account’

select @count = count(*) from msdb.dbo.sysmail_account where name = @acc_name… 264 more words