5.15 SMSService
The SMSService allows an application to send Short Message Service text messages (more commonly known as SMS or texting) to mobile phones anywhere in the world. Over the last few years SMS has grown into an extensively used communication tool. It is normally used for mobile phone to mobile phone messaging but the requirement to send messages generated from computers to mobile phones is very established and growing.
For the SMSService to work, the details of the message needs to be sent to an SMS gateway. This is typically a company that provides the services of sending SMS messages to telecommunication providers. The SMSService provides two approaches for sending the message to the SMS gateway.
- SMTP Protocol - in this approach the SMSService prepares and sends an email with the details of the message to an SMS gateway.
- HTTP Protocol - in this approach the SMSService forwards the message details to the SMS gateway as an HTTP POST. The HTTP transport provides you with greater security including an HTTPS option, so you might use this approach should this be required by your application.
The simpler of the two transports is the SMTP approach. The SMTP transport is fairly standard across the industry. For example, most SMS gateway service providers will require an email message to be sent to them in the following format:
Email Address: <phone-number-to-be-messaged>@<mail-domain-of-the SMS-gateway-provider>.
For example [email protected] where nnnnnnnnnn is the mobile phone number that you want to send the message to).
Email Subject: Containing your account ID and password (for your subscription to this SMS provider).
Email Message: Containing the message to be sent to the mobile phone.
Some SMS gateway providers may require the information to be sent to them in other formats, but with the SMTP transport approach it is relatively simple to construct your email to meet the stipulated requirements.
The HTTP transport is less flexible, and there is no industry standard amongst the providers. Some may require you to send them the HTTP POST as named-value-pairs, while other may require a SOAP request, and others some other form of XML request.
The shipped SMSService comes with "ready-to-run" HTTP solutions that work with the service provided by StreetData, Kapow, Bulker, IntelliSoftware, TextMarker and ViaNett.
Should you wish to use a HTTP transport provided by another SMS gateway service provider, please contact your LANSA vendor for advice.
The SMSService is not currently set up to handle Multimedia Messaging Server (MMS) messages, though this restriction may potentially be overcome by using the SMTPMailService.
Related Services
The SMSService is not dependant on other services.
Some service providers may provide a delivery notification response (success or failure for example) or audit on the messages that you have sent. Such messages would normally be sent back to your 'From' address. You may wish to monitor these using the POP3MailService.
In many cases the SMTPMailService will enable you to achieve the same results. The SMSService does provide you with a more flexible solution though, including the ability to send the information via HTTP.
Technical Specifications
Most of the information required for the SMSService is defined in the SMSService property file. This ensures a consistent use of the properties and avoids the need to declare this information each time the service is used.