Added new interface to send messages by mode.