symfony/esendex-notifier

Symfony Esendex Notifier Bridge

安装次数: 40 127

依赖关系: 2

建议者: 0

安全: 0

星标: 6

关注者: 5

分支: 3

类型:symfony-notifier-bridge


README

为 Symfony Notifier 提供 Esendex 集成。

DSN 示例

ESENDEX_DSN=esendex://EMAIL:PASSWORD@default?accountreference=ACCOUNT_REFERENCE&from=FROM

其中

  • EMAIL 是您的 Esendex 账户邮箱
  • PASSWORD 是 Esendex API 密码
  • ACCOUNT_REFERENCE 是要发送消息的 Esendex 账户参考
  • FROM 是消息显示的发件人

请参阅 Esendex 文档:https://developers.esendex.com/api-reference#smsapis

向消息添加选项

使用 Esendex 消息,您可以使用 EsendexOptions 类添加消息选项。

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\Esendex\EsendexOptions;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new EsendexOptions())
    ->accountReference('account_reference')
    // ...
    ;

// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);

资源