I have installed the XPSMTP extended procedure from http://www.sqldev.net/xp/xpsmtp.htm.
This procedure returns 0 if an error occurs and 1 of execution is successful.
If I execute this procedure in QA it prints any errors in clear text in the Messages tab.

My question is: When I use this extended procedure in one of my own sprocs, is there any way to capture the text that QA prints in Messages? I want to log this message in a table.

The same question applies for procedures the uses the PRINT function. Is it possible for the calling TSQL to capture the PRINTed text?

Thanks in advanced!