HiI have a trigger to send an email if a table has an insert performed on it. When i perform the insert (from a web app) the app errors and no insert is performed and no email. My code is as follows CREATE TRIGGER triggername2ON expression_wish_formAFTER INSERTAS EXEC msdb.dbo.sp_send_dbmail @profile_name = 'DB Mail', @recipients = 'bob.jones@domain.com', @body = 'data has been inserted to the table', @subject = 'Reminder';GO
if I just run EXEC msdb.dbo.sp_send_dbmail @profile_name = 'DB Mail', @recipients = 'bob.jones@domain.com', @body = 'data has been inserted to the table', @subject = 'Reminder';
then i get the email, any ideas?