sysmail_delete_account_sp (Transact-SQL)
Deletes a Database Mail SMTP account. You can also use the Database Mail Configuration Wizard to delete an account.
Transact-SQL Syntax Conventions
- [ @account_id = ] account_id
-
The ID number of the account to delete. account_id is int, with no default. Either account_id or account_name must be specified.
- [ @account_name = ] 'account_name'
-
The name of the account to delete. account_name is sysname, with no default. Either account_id or account_name must be specified.
This procedure deletes the account specified, regardless of whether the account is in use by a profile. A profile that contains no accounts cannot successfully send e-mail.
The stored procedure sysmail_delete_account_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.
Reference
sysmail_add_account_sp (Transact-SQL)sysmail_delete_profile_sp (Transact-SQL)
sysmail_delete_profileaccount_sp (Transact-SQL)
sysmail_help_account_sp (Transact-SQL)
sysmail_help_profile_sp (Transact-SQL)
sysmail_help_profileaccount_sp (Transact-SQL)
sysmail_update_profileaccount_sp (Transact-SQL)
Other Resources
Database MailDatabase Mail Accounts
Database Mail Profiles
Select Configuration Task (Database Mail)