Write function to read content from message