NAME
Net::SMS::TMobile::UK - Send SMS Messages via the T-Mobile UK Website.
SYNOPSIS
use Net::SMS::TMobile::UK;
my $sms = Net::SMS::TMobile::UK->new(username=>$username, password=>$password);
$sms->sendsms(to=>$target, message=>$message);
DESCRIPTION
T-Mobile is a major mobile network. Their UK Website allows the sending of 'webtext' messages which are an SMS sent from the users mobile number and charged against their mobile phone account. This module allows the sending of these messages - ideal if you pay for a bundle of SMS messages in advance.
Please note that this module is nothing to do with T-Mobile, and will probably stop working should T-Mobile ever change the method for sms submission.
METHODS
new
Creates the Net::SMS::TMobile::UK object.
Usage:
my $sms = Net::SMS::TMobile::UK->new (username=>$username, password=>$password);
The complete list of arguments is:
username : Your registered T-Mobile username.
password : Your registered T-Mobile password.
useragent : Name of the user agent you want to display to T-Mobile.
sendsms
Sends a message through the T-Mobile website.
Usage:
$sms->sendsms( to => $mobile_phone, message => $msg );
where $mobile_phone is the mobile phone number that you're sending a message to and $msg is the message text.
This method returns 1 if we successfully send the message and undef on failure.
error
Returns a code that describes the last error ocurred.
Example:
if(my $error = $sms->error) {
if($error == 5) {
die("Message or Destination missing\n");
} elseif ($error == 2) {
die("Username or password invalid\n");
} else {
die("Unexpected fault\n");
}
}
Using same error codes as Net::SMS::Clickatell where possible:
0 - No error
1 - Username or password not defined (not used, as we require these during module construction)
2 - Username or password wrong
3 - Server has problems
4 - The message couldn't be sent
5 - No message or destination specified
AUTHOR
Ben Charlton, <benc at cpan.org>
BUGS
Please report any bugs or feature requests to bug-net-sms-tmobile-uk at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-SMS-TMobile-UK. 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::TMobile::UK
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
Search CPAN
ACKNOWLEDGEMENTS
Net:SMS::Clickatell by Roberto Alamos Moreno for inspiration.
COPYRIGHT & LICENSE
Copyright (c) 2007 Ben Charlton. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This software or the author aren't related to T-Mobile in any way.