I am currently using MS SQL Server 2008.
I have a stored procedure that sends an email using sp_send_dbmail. sp_send_dbmail prints “Mail Queued” to the result message. I need to erase this from the result message. Is there a way to fully clear what has been printed to the result message or to mute “print” commands like this from populating at all?
The
@exclude_query_outputargument suppresses it. By default is set to 0 so you just set it to 1.More information at documentation: sp_send_dbmail