Comment in lib/messagelib.php->message_send():
//TODO: we need to solve problems with database transactions here somehow, for now we just prevent transactions - sorry
|
$DB->transactions_forbidden();
|
This means that it's impossible to rollback a transaction if a message send fails.