...
- Set @@ProfileName = 'WB Report Scheduling'
- Set @@AccountName = 'WB Report Scheduling'
- Set @@EmailServer = '192.168.2.1'
- Set @@EmailAddress = 'john.doe@domain_name.com'
- Set @@ReplyAddress = 'john.doe@domain_name.com'
...
- msdb.dbo.sysmail_add_account_sp sp
- @account_name = @@AccountName
- @description = 'Workbench Report Scheduler Email Account'
- @email_address = @@EmailAddress
- @replyto_address = @@ReplyAddress
- @display_name = 'Workbench Report Scheduler'
- @mailserver_name = @@EmailServer
- @username = @@Username
- @password = @@Password ; – Add the account to the profile
...
- msdb.dbo.sysmail_add_profileaccount_sp sp
- @profile_name = @@ProfileName
- @account_name = @@AccountName
- @sequence_number =1
...