Home Forums SQL Server 2008 SQL Server Newbies How have Trigger's example after insert send to mail on outlook?. RE: How have Trigger's example after insert send to mail on outlook?.

  • Anthony is right - please look at the MSDN page for how to execute the sp_send_dbmail procedure. He gave you a link to the page. This is one of those things were it's better to teach someone how to fish instead of just giving them a fish. The reasons are:

    1. MSDN is a great resource for SQL Server syntax and what what accepts what parameters. If you don't use it already, you should start getting used to it with something simple. Then when you have to use it for something more difficult, you'll be able to.

    2. It appears that if we just post the code using your parameters, you'll just copy and paste it without understanding how it works, which is never advisable in a production environment. You are going to have to support the code, so you should always understand how it works.

    You're going to want to pass your parameters to the procedure when you execute it. Sorry if I'm being a pain here. You don't have to read the whole MSDN page, but it would help you understand how it works.