2017 © Pedro Peláez
 

symfony-bundle sendgrid-bundle

A bundle for integrating the sendgrid php library into the Symfony2 framework

image

tystr/sendgrid-bundle

A bundle for integrating the sendgrid php library into the Symfony2 framework

  • Thursday, May 5, 2016
  • by tystr
  • Repository
  • 1 Watchers
  • 7 Stars
  • 8,701 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 4 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

TystrSendgridBundle

Build Status Test Coverage, (*1)

A simple bundle for integrating the sendgrid php library into the Symfony2 framework., (*2)

Installation

Composer

Require the package with the following command:, (*3)

$ composer.phar require tystr/sendgrid-bundle

Configuration

Enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:, (*4)

new Tystr\Bundle\SendgridBundle\TystrSendgridBundle(),

Add the following to your configuration file:, (*5)

tystr_sendgrid:
    username: YOUR_SENDGRID_USERNAME
    password: YOUR_SENDGRID_PASSWORD

Usage

Retrieve the service like so:, (*6)

$sendgrid = $this->get('tystr_sendgrid.sendgrid');

See the Sendgrid Documentation for more information., (*7)

WebHooks

The bundle supports sendgrid webhooks., (*8)

Add the bundles routing to your application


# in app/config/routing.yml sendgrid_hooks: resource: "@TystrSendgridBundle/Resources/config/routing.xml"

Listen to any of the hook events


<service id="acme_sendgrid_listener" class="Acme\Bundle\SendgridListener"> <tag name="kernel.event_listener" event="sendgrid.bounce" method="onEmailBounce" /> </service>

namespace Acme\Bundle; use Tystr\Bundle\SendgridBundle\Event\WebHookEvent; class SendgridListener { public function onEmailBounce(WebHookEvent $event) { $this->logger->info('Address bounced: ' . $event-getEmail()->getOrElse('unknownEmail')); } }

Register the webhook

In the sendgrid interface, register the URL http://yourApp.com/__tystr/sendgrid as the webhook., (*9)

The Versions

05/05 2016

dev-master

9999999-dev https://github.com/tystr/TystrSendgridBundle

A bundle for integrating the sendgrid php library into the Symfony2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tyler Stroud

email sendgrid

01/04 2015

v0.1.1

0.1.1.0 https://github.com/tystr/TystrSendgridBundle

A bundle for integrating the sendgrid php library into the Symfony2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tyler Stroud

email sendgrid

14/07 2014

v0.1.0

0.1.0.0 https://github.com/tystr/TystrSendgridBundle

A bundle for integrating the sendgrid php library into the Symfony2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tyler Stroud

email sendgrid