NAME

Net::SMS::160By2 - Send SMS using your 160By2 account!

VERSION

Version 0.04

SYNOPSIS

This module provides a wrapper around 160By2.com to send an SMS to any mobile number in

India, Kuwait, UAE, Saudi, Singapore, Philippines & Malaysia at present.

you can use this as follows.

 use Net::SMS::160By2;

 my $obj = Net::SMS::160By2->new(); # or Net::SMS::160By2->new({debug => 1, verbose => 1});
 $obj->login($username, $password);

 # Send SMS to one mobile number 
 # country code is optional in mobile number
 my ($msg1, $to1) = ('Test Msg', 1111111111);
 $obj->send_sms($msg1, $to1);

 # Send SMSes to Many mobile numbers
 my ($msg1, $to1, $msg2, $to2) = ('Test Msg 1', 2222222222, 'Test Msg 2', 3333333333);
 my @array = ( 
   [ $msg2, $to2 ], 
   [ $msg3, $to3 ],
   # include as many as your want
 );

 $obj->send_sms_multiple(\@array);

 # logout from 160by2.com
 $obj->logout();

 # send additional params will print WWW::Mechanize detailed request and
 # responses

Thats it!

SUBROUTINES/METHODS

new

This is constructor method.

input: username, password

A new object will be created with username, password attributes.

You can send additional params in a hash ref as 3rd parameter.

at present only debug option is handled in additional params.

output: Net::SMS::160By2 object

login

Login to www.160By2.com

logout

Logout from 160By2.com

send_sms

This method is used to send an SMS to any mobile number. input : message, to

where message contains the information you want to send. to is the recipient mobile number

send_sms_multiple

This method is used to send an SMS to many mobile numbers. input : $ARRAY_REF [ [$msg1, $to1], [$msg2, $to2], [$msg3, $to3], etc.. ]

where message contains the information you want to send. to is the recipient mobile number

_format_input

This will format message and mobile number

logger

Log info for debugging purpose

AUTHOR

Mohan Prasad Gutta, <mohanprasadgutta at gmail.com>

BUGS

Please report any bugs or feature requests to bug-net-sms-160by2 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-SMS-160By2. 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 Net::SMS::160By2

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2014 Mohan Prasad Gutta.

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.