symfony / click-send-notifier
Symfony ClickSend Notifier 桥接器
v7.1.1
2024-05-31 14:57 UTC
Requires
- php: >=8.2
- symfony/http-client: ^6.4|^7.0
- symfony/notifier: ^6.4|^7.0
Requires (Dev)
- symfony/event-dispatcher: ^6.4|^7.0
This package is auto-updated.
Last update: 2024-08-25 06:42:32 UTC
README
为 Symfony Notifier 提供 ClickSend 集成。
DSN 示例
CLICKSEND_DSN=clicksend://API_USERNAME:API_KEY@default?from=FROM&source=SOURCE&list_id=LIST_ID&from_email=FROM_EMAIL
其中
API_USERNAME
是您的 ClickSend API 用户名API_KEY
是您的 ClickSend API 密钥FROM
是您的发送者(可选)SOURCE
是您的发送方式(可选)LIST_ID
是您的接收者列表 ID(可选)FROM_EMAIL
是您需要回复的电子邮件地址(可选)
向消息添加选项
使用 ClickSend 消息,您可以使用 ClickSendOptions
类添加 消息选项。
use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Bridge\ClickSend\ClickSendOptions; $sms = new SmsMessage('+1411111111', 'My message'); $options = (new ClickSendOptions()) ->country('country') ->customString('custom_string') ->fromEmail('from_email') ->listId('list_id') ->schedule(999) ->source('source') // ... ; // Add the custom options to the sms message and send the message $sms->options($options); $texter->send($sms);
资源
- 贡献
- 报告问题 和 发送拉取请求 在 主要 Symfony 仓库