revision-ten/sendinblue
最新稳定版本:1.2.0
Composer 安装命令:
composer require revision-ten/sendinblue
包简介
A very minimal Sendinblue integration for Symfony
README 文档
README
Installation
Install via composer
Run composer req revision-ten/sendinblue.
Add the Bundle
Add the bundle to your AppKernel (Symfony 3.4.*) or your Bundles.php (Symfony 4.*).
Symfony 3.4.* /app/AppKernel.php:
new \RevisionTen\Sendinblue\Sendinblue\Bundle(),
Symfony 4.* /config/bundles.php:
RevisionTen\Sendinblue\SendinblueBundle::class => ['all' => true],
Configuration
Configure the bundle:
# sendinblue example config. sendinblue: api_key: 'XXXXXXXXXXXXXXXXXXXXXXX-us5' # Your sendinblue api key. campaigns: dailyNewsletterCampagin: list_id: 12345 # ID of your newsletter list. doi_template_id: 123 # ID of your double opt-in template.
Usage
Use the SendinblueService to subscribe users.
Symfony 3.4.* example:
$sendinblueService = $this->container->get(SendinblueService::class); try { $subscribed = $sendinblueService->subscribe('dailyNewsletterCampagin', 'visitor.email@domain.tld', 'My Website', [ 'FNAME' => 'John', 'LNAME' => 'Doe', ]); } catch (Exception $e) { // ... }
Or unsubscribe users:
$sendinblueService = $this->container->get(SendinblueService::class); $unsubscribed = $sendinblueService->unsubscribe('dailyNewsletterCampagin', 'visitor.email@domain.tld');
统计信息
- 总下载量: 1.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-03