SMS::Send::TMC - SMS::Send driver to send messages via TMC (http://www.tmcsms.com/)
version 0.01
use SMS::Send;
# Create a sender
my $sender = SMS::Send->new(
'AQL',
_login => 'tmc_username',
_password => 'tmc_password',
);
# Send a message
my $sent = $sender->send_sms(
text => 'This is a test message',
to => '+61 (4) 1234 5678',
);
if ($sent) {
print "Message sent ok\n";
}
else {
print "Failed to send message\n";
}
A driver for SMS::Send to send SMS text messages via TMC (Text Messaging Centre) - http://www.tmcsms.com/
This is not intended to be used directly, but instead called by SMS::Send (see synopsis above for a basic illustration, and see SMS::Send's documentation for further information).
The driver uses the TMC HTTP GET API mechanism. This is documented at http://www.tmcsms.com/developers/
Constructor, takes argument pairs passed by SMS::Send, returns an SMS::Send::TMC object. See usage synopsis for example, and see SMS::Send documentation for further info on using SMS::Send drivers.
Additional arguments that may be passed include:-
- _endpoint
-
The HTTP API endpoint. Defaults to
https://www.tmcsms.co.uk/api/SendService.aspx
- _timeout
-
The timeout in seconds for HTTP operations. Defaults to 20 seconds.
- _debug
-
Whether debugging information is output.
- _reference
-
The reference used on sent messages - this will show up in the web interface. For details of this see the
reference
parameter in the API documentation. Defaults toMessage
. - _source
-
The source identifier or number attached to the message. This has a number of possible values -
Mobile
,CompanyName
,NickName
,Signature
orInboundNumber
. For details of this see thesource
parameter in the API documentation. The default isInboundNumber
- _confirm
-
What form of confirmation should be sent. Binary or of the values 2 (for Mobile confirmation) and 4 (for Email confirmation). For details of this see the
confirm
parameter in the API documentation. Defaults to 0. - _unicode
-
Whether the message is in Unicode (a
true
value) or ASCII (afalse
value). For details of this see theunicode
parameter in the API documentation. Defaults totrue
.
Send the message - see SMS::Send for details. Additionally the following options can be given - these have the same meaning as they do in the new
method:-
_reference
_source
_confirm
_unicode
See perlmodinstall for information and options on installing Perl modules.
You can make new bug reports, and view existing ones, through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=SMS-Send-TMC.
The project homepage is https://metacpan.org/release/SMS-Send-TMC.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see https://metacpan.org/module/SMS::Send::TMC/.
Nigel Metheringham <nigelm@cpan.org>
This software is copyright (c) 2013 by Nigel Metheringham.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.