sarbacane-sdk/php
Composer 安装命令:
composer require sarbacane-sdk/php
包简介
Sarbacane SDK to send e-mail and text messages (sms).
README 文档
README
Sarbacane SDK PHP - Send e-mail and text messages (sms)
- Account & API Key
- Installation
- Download sources
- Authentication
- Buy credits
- Send E-mail
- Send SMS
- Webhooks
Account & API Key
Generate your E-mail Tokens (be logged in first)
SMS
Generate your SMS API Key (be logged in first)
Installation
composer require sarbacane-sdk/php
Sources
git clone https://github.com/sarbacane-sdk/php.git .
Authentication
sarbacane_sdk\authenticationManager::setEmailTokens('MY_EMAIL_USERNAME', 'MY_EMAIL_APIKEY');
SMS
sarbacane_sdk\authenticationManager::setSmsApikey('MY_SMS_APIKEY');
Credits
Send E-mail
$email = new sarbacane_sdk\SBEmailMessage();
$email->mailFrom = "sender@domain.com";
$email->mailFromName = "Sender Name";
$email->subject = "Message sent by Sarbacane SDK PHP";
$email->htmlBody = "Here is the <b>HTML</b> content of the message.";
$email->textBody = "Here is the TEXT content of the message.";
$email->recipients = array(
"address1@domain.com",
"address2@domain.com"
);
sarbacane_sdk\messagesManager::sendEmailMessage($email);
Send SMS
$sms = new \sarbacane_sdk\SBSmsMessage();
$sms->type = 'notification';
$sms->number = '+33600000000';
$sms->message = 'Code de confirmation: 283951';
$sms->sender = 'YourCompany';
$sms->campaignName = 'Code de confirmation';
$sms->category = 'codeConfirmation';
sarbacane_sdk\messagesManager::sendSmsMessage($sms);
统计信息
- 总下载量: 425
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-13


