I have a SQL server / database locally and accessed through ip etc…
What I want to know is how to send emails directly from the server (when n happens)?
Advertisement
Answer
You can use Database Mail
. To send e-mails via SQL Server you can use the following stored procedure:
sp_send_dbmail
EXEC msdb.dbo.sp_send_dbmail @profile_name = 'Adventure Works Administrator', @recipients = 'danw@Adventure-Works.com', @body = 'The stored procedure finished successfully.', @subject = 'Automated Success Message' ;
Or how to configure a SQL agent to send mail
http://msdn.microsoft.com/en-us/library/ms186358.aspx
Additional references