Method and system for transmitting messages over cellular networks and a public data network