MDL-64017 added a message digest which is the cause of this issue.
- The messaging email processor is enabled.
- User A sends user B a message.
- This gets added to the message_email_messages table.
- User B then logs in and reads the message.
- The task message_email\task\send_email_task is run and sends the message (that has already been read) to user B.
We can avoid this by removing the message from the message_email_messages table once it has been read.