Make sendMessage a bit more flexible for sending to different targets