Jaa


Database Mail Messaging Objects

Database Mail exposes the following objects in the msdb database when Database Mail is enabled.

Name Type Description

sysmail_allitems (Transact-SQL)

View

Lists all messages submitted to Database Mail.

sysmail_event_log (Transact-SQL)

View

Lists messages about the behavior of the Database Mail External Program.

sysmail_faileditems (Transact-SQL)

View

Information about messages that Database Mail could not sent.

sysmail_mailattachments (Transact-SQL)

View

Information about attachments to Database Mail messages.

sysmail_sentitems (Transact-SQL)

View

Information about messages that have been sent using Database Mail.

sysmail_unsentitems (Transact-SQL)

View

Information about messages that Database Mail in currently trying to send.

sp_send_dbmail (Transact-SQL)

Stored Procedure

Sends e-mail messages using Database Mail.

sysmail_delete_log_sp (Transact-SQL)

Stored Procedure

Deletes messages from the Database Mail log.

sysmail_delete_mailitems_sp (Transact-SQL)

Stored Procedure

Deletes mail items from the Database Mail queue.

sysmail_help_status_sp (Transact-SQL)

Stored Procedure

Indicates if Database Mail is started.

sysmail_start_sp (Transact-SQL)

Stored Procedure

Starts the Service Broker objects that the external program uses. These objects are started by default.

sysmail_stop_sp (Transact-SQL)

Stored Procedure

Stops the Service Broker objects that the external program uses.

These objects are the interface for Database Mail within the mail host database. Other objects are installed to implement the functionality provided by the objects listed above. However, those objects are reserved for internal use.

Use the Database Mail views to troubleshoot Database Mail. For more information, see Troubleshooting Database Mail.

The msdb database contains stored procedures for configuring Database Mail. For more information about those procedures, see Database Mail Configuration Stored Procedures.

See Also

Concepts

Database Mail Configuration Objects
Database Mail Architecture

Help and Information

Getting SQL Server 2005 Assistance