To reproduce the bug:
1. assign to a teacher the bulkmessaging and readallmessage capabilities (if not already assigned)
2. disable the messaging system
2. login as teacher, enter the participant list in a course, select one or more participant then Send a message to selected people using the drop down list.
3. Enter a message, then click preview
4. Once in preview, click send.
5. Moodle claims the message has been sent, while it has not since the Messaging is disabled.