Author image David Warring
and 1 contributors


SMS::Send::SMSGlobal::HTTP - SMS::Send Driver




SMS::Send::SMSGlobal::HTTP is a simple driver for SMS::Send for sending messages via using the SMS Global HTTP API.



    use SMS::Send;

    my $sender = SMS::Send->new('SMSGlobal::HTTP',
               _user       => 'my-username',
               _password   => 'my-password',
               __transport => 'https',
               __verbose   =>  1


    my $sent = $sender->send_sms(
        to        => '+61 4 8799 9999',
        text      => 'Go to the window!',
        _from     => 'Clang',
        _scheduledtime => DateTime
                             ->now(time_zone => 'Australia/Melbourne')
                             ->add(minutes => 5)

Basic Options


The recipient number. This can either be an international number (prefixed with +) or an local number (with a leading 0).

Note: In the case of a local number, the country will be determined by your Default SMS Country Locale Setting in your account preferences.


The text of the message.


Sets the from caller-ID. This can either be a reply telephone number, or an alphanumeric identifier matching ^[0-9a-zA-Z_]+$. For details. see .

_maxsplit (default 3)

The maximum number of 150 character (approx) transmission chunks. You may need to increase this to send longer messages.

Note: Each chunk is metered as a separate message.


Lets you delay sending of messages. This can be either (a) a string formatted as yyyy-mm-dd hh:mm:ss or (b) an object that supports ymd and hms methods. For example DateTime or Time::Piece objects.

Note: Your date times need to to be specified in the same timezone as set in your SMSGlobal account preferences.

HTTP-2WAY Options

Some extra options for handling SMS replies. These are useful when you are using dedicated incoming numbers, with your account. See


Set to 0, to disabled two-way messaging. The default is 1 (enabled).


Custom field to store internal IDs or other information (Maximum of 255 characters)

Configuration Options


SMSGlobal gateway address (default: '');


Transport to use: 'http' (default) or 'https'.

Transport over 'https' is encrypted and more secure. However, this option requires either Crypt::SSLeay or IO::Socket::SSL to be installed. More information is available at


Set to true to enable tracing.

Sending SMS to Multiple Recipients

It is possible to specify multiple recipients in a request. However, this requires direct use of the SMS::Send::SMSGlobal::HTTP driver:

    use SMS::Send::SMSGlobal::HTTP;

    my $driver = SMS::Send::SMSGlobal::HTTP->new(
        _user => $sms_login,
        _password => $sms_pass,
        __verbose => 1,
        __transport => 'https',

The driver can accept either an array of mobile numbers or a string containing a comma-separated list of mobile numbers.

   my @recipients = ( '+61(4)770090099', '0419 123 456' );

   my $sent = $driver->send_sms( _from => $caller_id,
                                 to    => \@recipients,
                                 text  => 'Hi everyone!',

The return value is the number of messages queued for delivery to individual recipients.

__responses contains sucesss or error codes for each recipient.

    if ( $sent < scalar @recipients ) {
        warn "failed to send to some participants";

        my @responses = @{ $driver->__responses || [] };
        for ( @responses ) {
            warn $_ if m{ERROR};


David Warring, <david.warring at>


This module only attempts to implement the simple HTTP/S sendsms command as described in and

There are other API's available ( Among the more fully featured are the SOAP interface ( and SMPP (

Please report any bugs or feature requests to bug-sms-send-au-smsglobal at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc SMS::Send::SMSGlobal::HTTP

You can also look for information at:


Copyright 2011-2012 David Warring.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.