snowcap/mailjet-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

snowcap/mailjet-bundle

Composer 安装命令:

composer require snowcap/mailjet-bundle

包简介

Mailjet wrapper for Symfony2

README 文档

README

The Snowcap Mailjet Bundle is a bundle used at Snowcap to help us with the Mailjet API:

It includes an refactored version of Mailjet API client (found on https://www.mailjet.com/plugin/php-mailjet.class.php) with:

  • PSR-0 standards
  • New constants
  • A bundle configuration

Prerequisites

This version of the bundle requires Symfony 2.1+.

Installation

Download SnowcapMailjetBundle using composer

Add SnowcapCoreBundle in your composer.json:

{
    "require": {
        "snowcap/mailjet-bundle": "*"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update snowcap/mailjet-bundle

Composer will install the bundle to your project's vendor/snowcap directory.

Enable the Bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Snowcap\MailjetBundle\SnowcapMailjetBundle(),
    );
}

Configure Mailjet

In your config.yml:

snowcap_mailjet:
    api_key: %mailjet_api_key%
    secret_key: %mailjet_secret_key%

An optional parameter "debug" is available (0 by default). See Mailjet's doc for more information.

Usage

The API is available with the "snowcap_mailjet" service. In your controller (or elsewhere):

public function newsletterAction()
{
    // Get Mailjet client
    $client = $this->get('snowcap_mailjet');
    
    // Add an email to a mailing list
    $client->listsAddcontact(
        array(
            'contact' => 'someone@email.com',
            'id'      => 'your-list-id',
            'force'   => true,
            'method'  => 'POST'
        )
    );
}

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-12-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固