I am trying to keep a record of all of the emails that get sent via xp_smtp mail component, but I don't know hw to store the message. Storing a 1 because it failed doesn't do me much good.
DECLARE @rc INT EXEC @rc = master.dbo.xp_smtp_sendmail...
--Once the email is sent put the results (pass or fail) into another table: EXEC pr_InsertEmailLog @Body, @From, @Subject, @To, @rc, 'Error MESSAGE here'
Thanks in advance, Jeremy