print_to_message function

Simple function for capturing from the print function and send it in a message().