Added function for posting messages.