I have a SQL 2000 SP4 box that was sending emails thru its MAPI nonsense, but the admins went in and pooched the MAPI client and now it’s broken, for like the 10th time. So, the SQL 2000 database has a sister database on a SQL 2005 box that I created an SP on that the SQL 2000 box will use to send emails instead of the MAPI.
alter proc usp_StatusEmail @email_CCs varchar(255), @email_to_list varchar(255), @email_body varchar(5000), @email_subject varchar(255) as EXEC msdb.dbo.sp_send_dbmail @recipients = @email_to_list, @copy_recipients = @email_CCs , @body = @email_body, @subject = @email_subject
The SP works when it is called from the 2000 box, but after it sends the email, it throws an error …
Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.
Is there a way to stop this?