2017 © Pedro Peláez
 

symfony-bundle mandrill-bundle

Symfony Mandrill Bundle

image

terehinis/mandrill-bundle

Symfony Mandrill Bundle

  • Thursday, May 3, 2018
  • by terehinis
  • Repository
  • 1 Watchers
  • 0 Stars
  • 544 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 43 Forks
  • 0 Open issues
  • 19 Versions
  • 214 % Grown

The README.md

SlotMandrillBundle

Build Status, (*1)

Send transactional mail through mandrill.com. This bundle provides an easy api for Symfony2 Projects., (*2)

All settings inside message class represent attributes of Mandrill's API. Please refer to their API documentation for Details:, (*3)

https://mandrillapp.com/api/docs/messages.html, (*4)

Prerequisites

Before you're able to use this bundle you must sign up with Mandrill., (*5)

http://mandrill.com, (*6)

Mandrill is a great way to send your transactional emails and provides detailed advances reports., (*7)

Mandrill is free for limited number of email per day, please read through pricing section on the website for more information:, (*8)

http://mandrill.com/pricing/, (*9)

Installation

Add the bundle to your composer.json, (*10)

# composer.json
{
 "require": {
     "slot/mandrill-bundle": "dev-master",
 }
}

Run composer install, (*11)

php ./composer.phar install

Enable the bundle in the kernel, (*12)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Slot\MandrillBundle\SlotMandrillBundle(),
    );
}

Configuration

Add configuration to config.yml., (*13)

Log in to Mandrill and go to "Settings" -> "SMTP and API Credentials". Create an API Key and use it in your Symfony2 Configuration., (*14)

# config.yml

slot_mandrill:
    api_key: xxxxx
    disable_delivery: true # useful for dev/test environment. Default value is 'false'
    # debug: passed to \Mandrill causing it to output curl requests. Useful to see output
    # from CLI script. Default value is 'false'
    debug: true
    default:
        sender: info@example.com
        sender_name: John Doe # Optionally define a sender name (from name)
        subaccount: Project # Optionally define a subaccount to use
    proxy:
        use: true # when you are behing a proxy. Default value is 'false'
        host: example.com
        port: 80
        user: john
        password: doe123

Now you're all set, send your first transactional mails:, (*15)

Use

Simple controller Example:, (*16)


<?php // src/Slot/ExampleBundle/Controller/ExampleController.php namespace Slot\ExampleBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Slot\MandrillBundle\Message; use Slot\MandrillBundle\Dispatcher; class ExampleController extends Controller { public function indexAction() { $dispatcher = $this->get('slot_mandrill.dispatcher'); $message = new Message(); $message ->setFromEmail('mail@example.com') ->setFromName('Customer Care') ->addTo('max.customer@email.com') ->setSubject('Some Subject') ->setHtml('<html><body><h1>Some Content</h1></body></html>') ->setSubaccount('Project'); $result = $dispatcher->send($message); return new Response('<pre>' . print_r($result, true) . '</pre>'); } }

Using Handlebars

By default the bundle will assume the merge language is 'mailchimp'. You can change this with $message->setMergeLanguage('handlebars'), (*17)

The Versions

03/05 2018

dev-master

9999999-dev https://github.com/terehinis/MandrillBundle

Symfony Mandrill Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

email symfony messages mandrill transaction mail transactional

03/05 2018

v1.4

1.4.0.0 https://github.com/terehinis/MandrillBundle

Symfony Mandrill Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

email symfony messages mandrill transaction mail transactional

03/05 2018

v1.3

1.3.0.0 https://github.com/terehinis/MandrillBundle

Symfony Mandrill Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

email symfony messages mandrill transaction mail transactional

03/05 2018

v1.2

1.2.0.0 https://github.com/terehinis/MandrillBundle

Symfony Mandrill Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

email symfony messages mandrill transaction mail transactional

08/12 2015

v1.0.10

1.0.10.0 https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

15/09 2015

v1.0.9

1.0.9.0 https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

19/04 2015

dev-add-user-info

dev-add-user-info https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

16/04 2015

v1.0.8

1.0.8.0 https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

09/03 2015

v1.0.7

1.0.7.0 https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

24/02 2015

1.0.6

1.0.6.0 https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

04/02 2015

v1.0.5

1.0.5.0 https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

04/02 2015

dev-message-defaults-set-null

dev-message-defaults-set-null https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional

26/01 2015
09/01 2015
01/08 2014
23/07 2014
03/05 2013
23/01 2013

0.1.x-dev

0.1.9999999.9999999-dev https://github.com/Hipaway-Travel/HipMandrillBundle

Symfony HipMandrillBundle

  Sources   Download

MIT

The Requires

 

email messages mandrill transaction mail transactional