Net::SMS::RoutoMessaging - Send SMS messages via the RoutoMessaging HTTP API
version 0.09
# Create a testing sender my $sms = Net::SMS::RoutoMessaging->new( username => 'testuser', password => 'testpass' ); # Send a message my ($sent, $status) = $sms->send_sms( message => "All your base are belong to us", number => '1234567890', ); $sent will contain a true / false if the sending worked, $status will contain the status message from the provider. # If you just want a true / false if it workes, use : my $sent = $sms->send_sms( message => "All your base are belong to us", number => '1234567890', ); # If you want a better description of the status message, use the # long_status parameter my ($sent, $status, $desc) = $sms->send_sms( message => "All your base are belong to us", number => '1234567890', long_status => 1, ); if ($sent) { # Success, message sent } else { # Something failed warn("Failed : $status"); }
Perl module to send SMS messages through the HTTP API provided by RoutoMessaging (routomessaging.com).
new( username => 'testuser', password => 'testpass' )
Nothing fancy. You need to supply your username and password in the constructor, or it will complain loudly.
send_sms(number => $phone_number, message => $message)
Uses the API to send a message given in $message to the phone number given in $phone_number.
$message
$phone_number
Phone number should be given with only digits. No "+" or spaces, like this:
1234567890
Returns a true / false value and a status message. The message is "success" if the server has accepted your query. It does not mean that the message has been delivered. If the long_status argument is set, then it also returns a long description as the third value.
RoutoMessaging website, http://www.routomessaging.com/
Terje Kristensen <terjek@opera.com>
This software is Copyright (c) 2011 by Opera Software ASA.
This is free software, licensed under:
The (three-clause) BSD License
To install Net::SMS::RoutoMessaging, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SMS::RoutoMessaging
CPAN shell
perl -MCPAN -e shell install Net::SMS::RoutoMessaging
For more information on module installation, please visit the detailed CPAN module installation guide.