Updated send messages to function with dynamic strings