Send a text message to the specified recipient. Optionally, sends can be scheduled.
See also What is a sent message?
With the minimum arguments required, sends 'my message' to 447000000000 with sender ID 'Sender':
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
$result = $tmClient->sendSMS('My message', '447000000000', 'Sender'); echo "Used {$result['credits_used']} credits, message ID {$result['message_id']}"; |
As above, but sets validity to 72 hours and is scheduled for sending on 1st Jan 2013 at 01:00 GMT:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
$result = $tmClient->sendSMS('My message', '447000000000', 'Sender', 72, null, 'myTag', '2013-01-01T01:00:00+00:00'); echo "Used {$result['credits_used']} credits, scheduled ID {$result['scheduled_id']}"; |
Warning | ||
---|---|---|
| ||
Our example code is an illustration of how you might integrate with our systems and is not certified for production environments. You are responsible for testing and QA. |