定制 blue-energy/sendinblue-api-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 here https://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 我们能提供哪些服务?
定制开发 / 二次开发

基于 blue-energy/sendinblue-api-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-22