Skip to content

sms_send ​

php
mixed sms_send ( string $gsmNumber, string $content, [[array|boolean $extra = false], number &$returnCode]] )

Sends an SMS to $gsmNumber with content $content. Use $extra to supply additional mailing settings. Available parameters:

  • string sender - sender name
  • string campaign - campaign name
  • number SMSallowMB - allow diacritics in the SMS content (0 - disallow, 1 - allow)
If a variable is supplied as $returnCode, it receives the error code returned by the system.
  • -1 - syntactically invalid GSM number
  • -2 - unsupported numbering zone
  • -3 - cost limit exceeded
  • -4 - sent SMS limit exceeded (anti-spam protection)
  • -999 - a critical system error occurred

Example:

php
$gsm = "+48123456789";
$content = "Test SMS content";
sms_send($gsm, $content);