sms77/craft

This package is abandoned and no longer maintained. The author suggests using the seven.io/craft package instead.

Send SMS and make text-to-speech calls via seven

v1.0.0 2021-04-20 09:08 UTC

This package is auto-updated.

Last update: 2023-12-15 13:16:49 UTC


README

68747470733a2f2f7777772e736576656e2e696f2f77702d636f6e74656e742f75706c6f6164732f4c6f676f2e737667

Official Craft CMS + Commerce Plugin

  • Send SMS via control panel
  • Send SMS via service
  • Send Voice via control panel
  • Send Voice via service
  • Bulk SMS (Craft Commerce only)
  • Bulk Voice (Craft Commerce only)

Prerequisites

Installation

This plugin is installable via Composer.

Open a terminal and execute the following commands:

# navigate to your project root
cd /var/www/craft

# retrieve the plugin source code via Composer
composer require seven.io/craft

# install the plugin via Craft CLI
./craft install/plugin seven

Setup

After installing seven, go to Settings → seven, and enter your API key.

Usage

How to send SMS:

use Seven\Craft\Plugin; // Use the plugin

$instance = Plugin::getInstance(); // init plugin

$sms = $instance->getSms(); // retrieve SMS service
    $sms->params // provides a fluent interface for method chaining
    ->setTo('+4901234567890, +456789012345') // required (recipient(s))
    ->setText('HI2U!') // required (message)
    ->setFrom('Craft'); // optional (caller id)
    $sms->send(); // dispatch

$voice = $instance->getVoice(); // retrieve Voice service
    $voice->params // provides a fluent interface for method chaining
    ->setTo('+4901234567890, +456789012345') // required (recipient(s))
    ->setText('HI2U!') // required (message)
    ->setFrom('Craft'); // optional (caller id)
    $voice->send(); // dispatch

Support

Need help? Feel free to contact us.

MIT