ysyrota / mojolicious-plugin-sms

Mojolicious::Plugin::SMS - easy SMS text message sending from your Mojolicious web apps
http://search.cpan.org/~ysyrota/Mojolicious-Plugin-SMS/
3 stars 0 forks source link

NAME Mojolicious::Plugin::SMS - Easy SMS sending from Mojolicious apps

SYNOPSIS

Mojolicious::Lite

  plugin 'SMS' => {
    driver    => 'Test'
  };

  # Mojolicious
  $self->plugin(SMS => {
    driver    => 'Nexmo',
    _username => 'testuser',
    _password => 'testpassword'
    _from     => 'Bender'
  });

  # in controller named params
  $self->sms(
    to   => '+380506022375',
    text => 'use Perl or die;'
  );

  # in controller positional params
  $self->sms('+380506022375', 'use Perl or die;');

DESCRIPTION Provides a quick and easy way to send SMS messages using SMS::Send drivers (of which there are many, so chances are the service you want to use is already supported; if not, they're easy to write, and if you want to change providers later, you can simply update a few lines in your config file, and you're done.