NAME

SMS::Send::TMC - SMS::Send driver to send messages via TMC (http://www.tmcsms.com/)

VERSION

version 0.01

SYNOPSIS

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";
}

DESCRIPTION

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/

METHODS

new

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 to Message.

_source

The source identifier or number attached to the message. This has a number of possible values - Mobile, CompanyName, NickName, Signature or InboundNumber. For details of this see the source parameter in the API documentation. The default is InboundNumber

_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 (a false value). For details of this see the unicode parameter in the API documentation. Defaults to true.

send_sms

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

INSTALLATION

See perlmodinstall for information and options on installing Perl modules.

BUGS AND LIMITATIONS

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.

AVAILABILITY

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/.

AUTHOR

Nigel Metheringham <nigelm@cpan.org>

COPYRIGHT AND LICENSE

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.