You can send e-mail from within stored procedures, functions, and triggers by using SQL Server Database Mail. You can also configure SQL Server Agent Mail to use Database Mail. Some features of Database Mail include:
- Uses Simple Mail Transport Protocol (SMTP)
- Does not require Outlook or Extended Messaging Application Programming Interface (MAPI) support
- Can use multiple SMTP servers
- Can be used in a cluster server configuration
- Supports asynchronous background delivery
- Supports multiple profiles and accounts
- Supports security features, included prohibited file extensions, a limit on attachment size, and auditing
- Allows you to send messages formatted in HTML