- (send-sms RECIPIENTS MESSAGE [username: USERNAME] [password: PASSWORD] [group: GROUP?] [tts-fallback: FALLBACK?] [error-on-failure ERROR?])procedure
Send MESSAGE (a string) as an SMS-message to RECIPIENTS, which is either a string or a list of strings identifying the recipients. These can be either phone numbers or a group name. If it's a group, GROUP? should be #t, otherwise it should be #f (the default). Groups can be defined in the SMSMatrix user interface on their site.
If FALLBACK? is #t, and one of the recipient numbers is a land line which can't receive SMS messages, the service will attempt to use a text-to-speech fallback for delivering your message, otherwise it will raise an error. FALLBACK? defaults to #f.
If ERROR? is #t (the default) this procedure will raise an error on the first number that failed. Be careful, however, this will currently just throw one error even if multiple phone numbers failed (there can also be different reasons for failure). If it is #f, you will just get a list of result alists which you will need to check for errors yourself.
The result of this call is a list of alists. Each alist represents one message sent, and includes the following keys:
- The phone number of this record (a string)
- The internal ID (an opaque hash code as a string) assigned to this message. You can use this to request more information with message-status or to look up the message in the CSV report.
- A number which is the UNIX timestamp at which time the message was delivered.
- A status code (number) indicating the delivery status of this record.
- A string containing the delivery status message.