Xp_sendmail is a great utility that SQL Server provides in order to e-mail messages directly from SQL Server, by using a valid MAPI profile. However, its syntax is rather stringent. In this article by Kunal Das, he shows you how to send messages to a list of recipients generated by a query dynamically in T-SQL.
By Kunal Das
2005/02/18 (first published: 2001/07/16)