SQL Server - Send Email Using Database Mail From TSQL or Stored Procedure

by Administrator 8. October 2009 18:28

Pretty simple stuff. This assumes that a valid database account etc. is set up and Database Mail is configured correctly

EXECUTE msdb.dbo.sp_send_dbmail @recipients='to@xxx.com',
@subject = 'Test email',
@body = 'Test email body',
@reply_to='from@yyy.com'


Buy Me a Beer ?

If you've found this site useful, you could help support its running costs by either checking out the adverts on the page if you find anything that interests you - or by making a small donation