Complete definitoin for sendMessage