Using query to alter sysmail servername in SQL SERVER 2012

to check db mail server configuration:

select * from
msdb.dbo.sysmail_account sa 
left join msdb.dbo.sysmail_server ss
on ss.account_id = sa.account_id;

to update the servername for an existing account:

exec msdb.dbo.sysmail_update_account_sp
@account_id = #,
@mailserver_name = 'something the resolves to an IP within your network';

No comments: