Database Mail feature can be used to send e-mail messages from the SQL Server Database Engine. Database Mail use SMTP server to send emails. Assume you want to get a list of SMPT server used by Database Mail due to potential changes in your existing network infrastructure. Below script can be helpful to get a list of SMPT servers.
1 2 3 4 5 6 7 8 9 10 11 |
SELECT servertype AS [Server Type], servername AS [Server Name/IP Address], port AS [Port], last_mod_datetime AS [Modify Date] FROM msdb.dbo.sysmail_server ----OR---- EXECUTE msdb.dbo.sysmail_help_account_sp ; |
Leave a Comment