Clear email queue in SQL Server
Introduction: Hello Guys, “ Welcome back” Today, i am here with another one new great article. In this article I explained how to clear email queue in SQL Server . This article will following SQL Server versions i.e. 2008, 2008R2, 2012, 2014, 2016, 2017, 2019 and 2022. Queued Email in SQL Server Implementation: For detailed understanding regarding Queue email in SQL Server , You can check my last article . The emails send by you but that is still in queued, are seen in msdb.dbo.sysmail_unsentitems table. SELECT * FROM msdb.dbo. sysmail_unsentitems Deleting unsent emails in Queue The emails send by you but that is still in queued, to delete these unsent emails from queue, you need to execute the following DELETE SQL query. DELETE FROM msdb.dbo. sysmail_unsentitems Conclusion: In above code, I have been explained that how to clear email queue in SQL Server . This code is very helpful for every developer. Bye and take care of you Developers. We will come back ...