var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Database Mail Configuration
I need some help in sending email in SQL Server...
I have configured database mail and able to send mails through "EXEC msdb.dbo.sp_send_dbmail" but I need to include logic and send mail based on success or failure of a stored procedure....
I execute a stored procedure like this
Osql.exe -E -Q "exec proc_name"
immediately after this based on success or failure of the above SP (capturing correct values and status from the above) i need to execute
EXEC msdb.dbo.sp_send_dbmail with message "completed successfully"
EXEC msdb.dbo.sp_send_dbmail "please check failures"
Thanks in advance
You didn't specif SQL Server version, so I'll assume 2005 onwards
P.S. this is pseudo code
EXEC master..sp_send_dbmail "wahooo"
EXEC master..sp_send_dbmail "oh no!"