With this new code, the complete sendMessage() method that's invoked by the Send button now looks like this:
sendMessage()