The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

SMS::Send::NANP::TextPower - SMS::Send driver for TextPower WebService

SYNOPSIS

Using SMS::Send Driver API

  SMS-Send.ini
  [NANP::TextPower]
  username=myuser
  password=mypass
  campaign=MTMO
  queue=1

  use SMS::Send;
  my $service = SMS::Send->new('NANP::TextPower');
  my $success = $service->send_sms(
                                   to   => '+1-800-555-1212',
                                   text => 'Hello World!',
                                  );

DESCRIPTION

This package provides an SMS::Send driver against the SMS web service at TextPower http://www.textpower.com/.

USAGE

Direct Object Usage

  use SMS::Send::NANP::TextPower;
  my $service = SMS::Send::NANP::TextPower->new(
                                          username => $username,
                                          password => $password,
                                         );
  my $success = $service->send_sms(
                                   to   => '+18005551212',
                                   text => 'Hello World!',
                                  );

Subclass Usage

 package SMS::Send::My::Driver;
 use base qw{SMS::Send::NANP::TextPower};
 sub _username_default {return "myusername"};
 sub _password_default {return "mypassword"};
 sub _campaign_default {return "mycampaign"};
 sub _queue_default    {return "1"};

 use SMS::Send;
 my $service = SMS::Send->new('My::Driver');
 my $success = $service->send_sms(to => '+18005551212', text => 'Hello World!');

METHODS

send_sms

Sends the SMS message and returns 1 for success and 0 for failure or die on critical error.

PROPERTIES

username

Sets and returns the username string value (passed to the web service as UID)

password

Sets and returns the password string value (passed to the web service as PWD)

campaign

Sets and returns the campaign string value (passed to the web service as Campaign)

Default: MTMO

queue

Sets and returns the queue boolean value (passed to the web service as Queue=y when true omitted when false)

Default: "" (false)

url

Sets and returns the url for the web service.

Default: https://secure.textpower.com/TPIServices/Sender.aspx Old Default: http://www.textpower.com/TPIServices/Sender.aspx

BUGS

Please log on RT and send an email to the author.

SUPPORT

DavisNetworks.com supports all Perl applications including this package.

AUTHOR

  Michael R. Davis
  CPAN ID: MRDVT
  Satellite Tracking of People, LLC
  mdavis@stopllc.com
  http://www.stopllc.com/

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

SMS::Send