Added a helper function to send formatted messages