SMS::Send::UK::123txt
Version 0.0.2
# Instantiate a sender object my $sender = SMS::Send->new( 'UK::123txt', _login => 'username', _password => 'password', _from => 'source_number', ); # Send a message my $sent = $sender->send_sms( text => 'This is my message', to => '0000000000' # In the format: 447312345679 );
SMS::Send::UK::123txt is a SMS::Send driver that provides SMS message sending via the 123-txt service
You need a 123-txt account in order to use this driver
# Instantiate a sender object my $sender = SMS::Send->new( 'UK::123txt', _login => 'username', _password => 'password', _from => 'source_number', );
The new constructor accepts three parameters, all of which are required:
new
The return value is a SMS::Send::UK::123txt object.
The parameter identifying the driver name
The _login parameter as supplied by 123-txt
_login
The _password parameter as supplied by 123-txt
_password
The _from parameter as specified in your 123-txt account as a source number or source id
_from
# Examine a passed phone number and attempt to return the number # in a format supported by the API, # croak if a conversion is not possible my $intl_number = clean_to($source_number);
The clean_to method accepts a single required parameter:
clean_to
The return value is the number in international format
A string containing the number to be cleaned
# Send a message my $sent = $sender->send_sms( text => 'This is my message', to => '0000000000' # In the format: 447312345679 );
The send_sms method accepts two parameters, both of which are required:
send_sms
The return value is a 0 or 1 representing false or true, indicating whether the send was successful.
A string of text representing the message, limited to 160 characters
A numeric string representing the phone number of the recipient, in a valid international format (i.e. country code followed by the number)
Andrew Isherwood <andrew.isherwood at ptfs-europe.com>
<andrew.isherwood at ptfs-europe.com>
Please report any bugs or features to andrew.isherwood at ptfs-europe.com
andrew.isherwood at ptfs-europe.com
You can find documentation for this module with the perldoc command.
perldoc SMS::Send::UK::123txt
Copyright (C) 2018 PTFS Europe https://www.ptfs-europe.com/
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself
Additionally, you are again reminded that this software comes with no warranty of any kind, including but not limited to the implied warranty of merchantability.
ANY use may result in charges on your 123-txt bill, and you should use this software with care. The author takes no responsibility for any such charges accrued.
Many thanks to the authors of the following modules that served as inspiration for this one:
To install SMS::Send::UK::123txt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SMS::Send::UK::123txt
CPAN shell
perl -MCPAN -e shell install SMS::Send::UK::123txt
For more information on module installation, please visit the detailed CPAN module installation guide.