What is the best way to send email from a database in SQL Server 2008 R2?

Migrating an obsolete database with SQL Server 2000 and several scheduled tasks that use SP_OACreate and CDOSYS to send emails to an open SMTP relay, as in this KB article: http://support.microsoft.com/kb/312839

In SQL Server 2008 R2, what's the best (easiest) way to replace the sendmail function? DB Mail seems to be the new best recommended way, who has a lot of experience with it or with another alternative?

+7
source share
3 answers

Yes, DB Mail is definitely the best way: this is simple SMTP.

Do not think about using:

  • sp_OA% and cdosys (sp_OA% can be complicated and resource leak)
  • xp_sendmail (requires local installation of Outlook for the MAPI client)
+3
source

Install SQL Server using DB Mail. It is quite simple and uses SQL Service broker to manage messages - this means that you will not lose mail if you cannot connect to the SMTP server.

+3
source

Yes, I use sp_send_dbmail primarily to send mail to SQL Server, and it seems to be quite easy to configure and a reliable option, with a lot of configuration available.

+3
source

All Articles