blue-energy/sendinblue-api-bundle
Composer 安装命令:
composer require blue-energy/sendinblue-api-bundle
包简介
Official SendinBlue provided API V2 Symfony 2.x & 3.x Bundle
关键字:
README 文档
README
Note: The latest API V3.0 ( LTS ) is now maintained at
https://github.com/sendinblue/and the Documentation is available herehttps://developers.sendinblue.com
This is SendinBlue provided API V2 Symfony Bundle. It implements the various exposed APIs that you can read more about on https://apidocs.sendinblue.com.
THIS IS FORKED FROM https://github.com/mailin-api/sendinblue-api-bundle
Prerequisites
This version of the bundle requires Symfony 2.x OR 3.x.
Installation
Download SendinBlueApiBundle using composer
Add SendinBlueApiBundle in your composer.json:
"require": {
"sendinblue/sendinblue-api-bundle": "2.0.*"
}
}```
Now tell composer to download the bundle by running the command:
```bash
$ composer update
OR
Simply install by running below command
$ composer require "sendinblue/sendinblue-api-bundle"
Composer will install the bundle to your project's vendor/sendinblue directory.
Enable the Bundle
In the kernel app/AppKernel.php:
<?php public function registerBundles() { $bundles = array( // ... new SendinBlue\SendinBlueApiBundle\SendinBlueApiBundle(), ); }
Add SendinBlue Api key
In your app/config/config.yml:
sendin_blue_api: api_key: <Your access key> # Our library supports a timeout value, which is an optional parameter, default is 30,000 MS ( 30 secs ) timeout: 5000
Usage
The API is available with the sendinblue_api service.
To access it, add in your controller (or elsewhere):
<?php $sendinblue = $this->get('sendinblue_api');
Example
Get your account information
<?php $sendinblue = $this->get('sendinblue_api'); $result = $sendinblue->get_account(); // var_dump($result);
To send email
<?php $sendinblue = $this->get('sendinblue_api'); $data = array( "to" => array("to@example.net"=>"to whom!"), "cc" => array("cc@example.net"=>"cc whom!"), "bcc" => array("bcc@example.net"=>"bcc whom!"), "replyto" => array("replyto@email.com","reply to!"), "from" => array("from@email.com","from email!"), "subject" => "My subject", "text" => "This is the text", "html" => "This is the <h1>HTML</h1><br/> This is inline image 1.<br/> <img src=\"{myinlineimage1.png}\" alt=\"image1\" border=\"0\"><br/> Some text<br/> This is inline image 2.<br/> <img src=\"{myinlineimage2.jpg}\" alt=\"image2\" border=\"0\"><br/> Some more text<br/> Re-used inline image 1.<br/> <img src=\"{myinlineimage1.png}\" alt=\"image3\" border=\"0\">", "attachment" => array(), "headers" => array("Content-Type"=> "text/html; charset=iso-8859-1","X-param1"=> "value1", "X-param2"=> "value2","X-Mailin-custom"=>"my custom value", "X-Mailin-IP"=> "102.102.1.2", "X-Mailin-Tag" => "My tag"), "inline_image" => array("myinlineimage1.png" => "your_png_files_base64_encoded_chunk_data","myinlineimage2.jpg" => "your_jpg_files_base64_encoded_chunk_data") ); $result = $sendinblue->send_email($data); // var_dump($result);
Support and Feedback
Be sure to visit the SendinBlue official documentation website for additional information about our API.
If you find a bug, please submit the issue in Github directly.
As always, if you need additional assistance, drop us a note here.
blue-energy/sendinblue-api-bundle 适用场景与选型建议
blue-energy/sendinblue-api-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「bundle」 「sendinblue」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 blue-energy/sendinblue-api-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 blue-energy/sendinblue-api-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 blue-energy/sendinblue-api-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Library to send email across all platforms using one interface.
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Provide a way to secure accesses to all routes of an symfony application.
DMS Meetup API Bundle, enables Meetup API clients in services
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-01-22