NAME
SMS::Send::SMSGlobal::HTTP - SMS::Send SMSGlobal.com Driver
VERSION
VERSION 0.06
DESCRIPTION
SMS::Send::SMSGlobal::HTTP is a simple driver for SMS::Send for sending messages via www.smsglobal.com using the SMS Global HTTP API.
SUBROUTINES/METHODS
new
use SMS::Send;
my $sender = SMS::Send->new('SMSGlobal::HTTP',
_user => 'my-username',
_password => 'my-password',
__transport => 'https',
__verbose => 1
);
send_sms
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
to-
The recipient number. This can either be an international number (prefixed with '
+') or an local number (with a leading0).In the case of a local number, the country will be dertimined by your
Default SMS CountryLocale Setting in your account preferences. text-
The text of the message.
_from-
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 http://www.routomessaging.com/dynamic-sender-id-service.pmx .
_maxsplit(default 3)-
The maximum number of 150 character (approx) transmisson chunks. You may need to increase this to send longer messages.
Note: Each chunk is metered as a separate message.
_scheduledtime-
Lets you delay sending of messages. This can be either (a) a string formatted as "yyyy-mm-dd hh:mm:ss" or (b) a date/time object that support
ymdandhmsmethods. 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 http://www.smsglobal.com/docs/HTTP-2WAY.pdf:
_api-
Set to 0, to disabled two messaging. The default is 1 (enabled).
_userfield-
Custom field to store internal IDs or other information (Maximum of 255 characters)
Configuration Options
__address-
SMSGlobal gateway address (default: 'http://smsglobal.com/http-api.php');
__transport-
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 <http://search.cpan.org/dist/libwww-perl/README.SSL>.
__verbose-
Set to true to enable tracing.
AUTHOR
David Warrring, <david.warring at gmail.com>
BUGS AND LIMITATIONS
This module only attempts to implement the frugal HTTP/S commands as described in http://www.smsglobal.com/docs/HTTP-2WAY.pdf and http://www.smsglobal.com/docs/HTTP-2WAY.pdf.
There are other API's available (http://www.smsglobal.com/en-au/technology/developers.php). Among the more fully featured is the SOAP interface (http://www.smsglobal.com/docs/SOAP.pdf).
Also note that sending to a list of recipients is possible, but currently requires direct use of this driver, which can accept either a comma separated list, or an array reference to recipient mobile numbers.
my $driver = SMS::Send::SMSGlobal::HTTP->new(
_user => $sms_login,
_password => $sms_pass,
__verbose => 1,
__transport => 'https',
);
my $sent = $driver->send_sms( _from => $caller_id,
to => \@recipient_mobile_nos );
Please report any bugs or feature requests to bug-sms-send-au-smsglobal at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send-SMSGlobal-HTTP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc SMS::Send::SMSGlobal::HTTP
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=SMS-Send-SMSGlobal-HTTP
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
Copyright 2011 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 http://dev.perl.org/licenses/ for more information.