nuffic/yii2-messente

此包的最新版本(dev-develop)没有可用的许可证信息。

Messente 组件,适用于 Yii 2 框架

dev-develop 2017-07-21 10:59 UTC

This package is auto-updated.

Last update: 2024-08-28 23:55:14 UTC


README

Yii 组件,用于向 messente 发送短信。在发送给 messente 之前,它还会检查指定国家的电话号码是否有效,以及电话类型是否为移动电话。

如何使用?

##使用 Composer 安装 只需将以下行添加到您的 composer.json 文件中的 require 对象下。

{
  "require": {
    "nuffic/yii2-messente" : "dev-develop"
  }
}

然后运行

$> composer update

##配置 现在将以下内容添加到您的配置文件中的 components 部分。

    'sms' => [
                'class'    => 'nuffic\messente\SMS',
                'username' => '<your API username>',
                'password' => '<your API password>',
                'from'     => '<default sender>' #optional
            ],

##使用

    Yii::$app->sms->send('EE', 'Content here', '+372 111 1111', 'SenderHere');