NAME

Net::SMS::12Move - Send SMS's via free SMS service of www.12move.nl.

SYNOPSIS

use Net::SMS::12Move;
use Tie::Persistent;

my %state;

# Read hash from file (created if not exists).
tie %state, 'Tie::Persistent', '12Move.pdb', 'rw';

my $users = [
             {'uid' => 'se123456','pwd' => 'secret'},
             {'uid' => 'sh112233','pwd' => 'foofoo'}
            ];

my $o = new Net::SMS::12Move('USERS' => $users,
                             'STATE' => \%state,
                             'VERBOSE' => 2);
$o->send_text('+31600001111','test');

# Save hash back to file.
untie %state;

DESCRIPTION

This package contains a class sending SMS's via the free SMS service of www.12move.nl. It supports multiple user accounts. It can also maintain a persistent state hash in which the state of the user accounts is saved so that login's aren't always necessary etc. Unfortunately this web based service takes a few minutes to send an SMS, but a least it works (for now).

CLASS METHODS

new ('USERS' => $users, 'STATE' => $state, 'PROXY' => $proxy, 'VERBOSE' => $level);

Returns a new Net::SMS::12Move object.

Parameters:

USERS Reference to an array of hash references where each hash reference contains 2 key-value pairs where 'uid' points to the user id and 'pwd' points to the password.

STATE Optional. If specified, then it must be a hash reference. This hash reference will be used to maintain state during the lifetime of the Net::SMS::12Move object. It is advisable to used a tied hash so that the hash can be saved to and read from a file. See Tie::Persistent.

PROXY Optional. If specified, then it must be a HTTP proxy URL such as 'http://www.myproxy.com:8080/'. Default is no proxy.

VERBOSE Optional. If specified, it must contain an integer between 0 and 2 where 0 is no verbosity at all, 1 means print only warnings to STDERR, and 2 means print all messages to STDERR. Default value is 1.

OBJECT METHODS

send_text($recipient,$message)

Sends a SMS text message. $recipient must contain one recipient specified in international format (ie +31611112222). $message is the text message to send.

HISTORY

Version 0.01 2002-01-15

Initial version.

AUTHOR

Craig Manley <cmanley@cpan.org>

COPYRIGHT

Copyright (C) 2001 Craig Manley. All rights reserved. This program is free software; you can redistribute it and/or modify it under under the same terms as Perl itself. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.