SQLMail Stored Procedures

A dynamic-link library, SQLMAP60.DLL, is installed with SQL Server and includes the extended stored procedures necessary for mail enabling. Following are descriptions of the SQLMail extended stored procedures:

SQLMail extended stored procedure

Description
xp_deletemail Deletes a specified message.
xp_findnextmsg Finds the next message in the mail box.
xp_readmail Reads a message and/or an attachment from the mail box.
xp_sendmail Sends a message and/or a query result set and/or an attachment to specified recipients.
xp_startmail Starts a SQL Server Mail client session.
xp_stopmail Stops a SQL Server Mail client session.

There is also one system stored procedure used by SQLMail:

SQLMail system stored procedure

Description
sp_processmail Processes mail in the inbox of SQL Server. Finds, reads, responds to, and deletes mail messages. Can return results of a query to a message sender. Can be called by SQL Executive as a scheduled task.

SQLMail system and extended stored procedures, syntax, and functionality are documented in the Microsoft SQL Server Transact-SQL Reference.