Yes, it is legal to send messages as it is approved by the government body TRAI (Telecommunication Regulatory Authority Of India). If you send such content that is against the privacy of a person. Your message will be rejected by the TRAI. Do not worry, you and your customers are protected.