Or you connect to the server hardware gsm gateway, or rent an sms gateway, one of the many services. In the latter case, you can program to provide for convenient distribution list of phone numbers from exelco and the formation of boilerplate texts. The law looks at it normally, if you have the documents confirming the consent of the owner of a phone number to receive mailings.