sysmail_help_profile_sp (Transact-SQL)
Lists information about one or more mail profiles.
When a profile name or profile id is specified, sysmail_help_profile_sp returns information about that profile. Otherwise, sysmail_help_profile_sp returns information about every profile in the SQL Server instance.
The stored procedure sysmail_help_profile_sp is in the msdb database and is owned by the dbo schema. The procedure must be executed with a three-part name if the current database is not msdb.
A. Listing all profiles
The following example shows listing all profiles in the instance.
EXECUTE msdb.dbo.sysmail_help_profile_sp;
Here is a sample result set, reformatted for line length:
profile_id name description ----------- ----------------------------- ------------------------------ 56 AdventureWorks2008R2 Administrator Administrative mail profile. 57 AdventureWorks2008R2 Operator Operator mail profile.
B. Listing a specific profile
The following example shows listing information for the profile AdventureWorks2008R2 Administrator.
EXECUTE msdb.dbo.sysmail_help_profile_sp
@profile_name = 'AdventureWorks2008R2 Administrator' ;
Here is a sample result set, reformatted for line length:
profile_id name description ----------- ----------------------------- ------------------------------ 56 AdventureWorks2008R2 Administrator Administrative mail profile.