NAME

Net::SMS::RoutoMessaging - Send SMS messages via the RoutoMessaging HTTP API

VERSION

version 0.06

SYNOPSIS

# 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");
}

DESCRIPTION

Perl module to send SMS messages through the HTTP API provided by RoutoMessaging (routomessaging.com).

METHODS

new

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

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.

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.

SEE ALSO

RoutoMessaging website, http://www.routomessaging.com/

AUTHOR

Terje Kristensen <terjek@opera.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2011 by Opera Software ASA.

This is free software, licensed under:

The (three-clause) BSD License