The first thing we need to do is to write the CLR code. Sending HTML formatted email using SSIS Script Task. You could add as many parameters as you want to extend the functionality, but I kept it simple to illustrate how easy this is to do. This is just the basic information to send an email. recipients - list of people to receive the email.In this CLR stored procedure we are going to pass in these parameters: If you have not yet built a CLR stored procedure, please refer to this tip,ĬLR Functions - Getting started with a string sort function, for what needs to be done for the initial setup.Įnable CLR to be run for your SQL Server.
In this tip I will show you how to build a basic CLR stored procedure to send email messages from SQL Server Express, although this same technique could be used for any version of SQL Server.
The downside is that this functionality does not exist in SQL Server Express. One of the nice things about SQL Server is the ability to send email using T-SQL. By: Greg Robidoux | Updated: | Comments (36) | Related: More > Express Edition