Added a sendMessage method for the Controller class.