The "New mail arrived" notification (for a single message) has a "Show mail" button. This is useful, but in the message viewer window that appears when this button is clicked the "Move to wastebin" action is disabled, both in the toolbar and "File" menu. This is a pity, because if the message turns out to be junk it would be very useful to be able to delete it immediately without having to open the main KMail window.
The problem appears to be in KMKernel::showMail(), where KMReaderMainWin::showMessage() is called with the third parameter, the item's parent collection, defaulted to none. KMReaderMainWin::showMessage() then disables the delete action because canChange is false if there is no parent collection.
This change fetches the item's parent collection as part of the job, and then passes it to the reader window. The delete action is then enabled and works, allowing an unwanted message to be deleted with just one extra click.