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::Plivo - SMS::Send backend for Plivo API

SYNOPSIS

(This is a Plivo port of the existing SMS::Send::Twilio module. See that module for more detailed documentation.)

  use SMS::Send;
  # Create an object. There are three required values:
  my $sender = SMS::Send->new('Plivo',
    _accounauthid => 'ACb657bdcb16f06893fd127e099c070eca',
    _authtoken  => 'b857f7afe254fa86c689648447e04cff',
    _from       => '+15005550006',
  );

  # Send a message to me
  my $sent = $sender->send_sms(
    text => 'Messages can be up to 1600 characters',
    to   => '+31645742418',
  );

  # Did it send?
  if ( $sent ) {
    print "Sent test message\n";
  } else {
    print "Test message failed\n";
  }

DESCRIPTION

SMS::Send::Plivo is an SMS::Send driver for the Plivo web service.

new

  # Create a new sender using this driver
  my $sender = SMS::Send->new('Plivo',
    _accountauthid => 'ACb657bdcb16f06893fd127e099c070eca',
    _authtoken  => 'b857f7afe254fa86c689648447e04cff',
    _from       => '+15005550006',
  );

The new constructor takes three parameters, which should be passed through from the SMS::Send constructor.

send_sms

It's really easy; if it returns a true value, sending the message was OK. If not we'd see an error message on STDERR.

  # Send a message to me
  my $sent = $sender->send_sms(
    text => 'Messages can be up to 1600 characters',
    to   => '+31645742418',
  );

AUTHOR

Mike Lempriere, <mikevntnr at cpan.org>

BUGS

Please report any bugs or feature requests to bug-sms-send-plivo at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send-Plivo. 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 SMS::Send::Plivo

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2023 by Mike Lempriere.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)

SEE ALSO

SMS::Send WWW::Plivo::API