Capabilities/moodle/site:messageanyuser
From MoodleDocs
- This allows a user to send a message to any user regardless of their messaging privacy settings i.e. they can send a message to a user who has blocked them.
- This capability is allowed for the default roles of manager, teacher and non-editing teacher.