Code Monkey home page Code Monkey logo

mandrillswiftmailerbundle's Introduction

MandrillSwiftMailerBundle

Build Status SensioLabsInsight

A Symfony bundle that provides a Mandrill Transport implementation based on Mandrill's API

Requirments

Mandrill API Key - https://mandrillapp.com/

Installation

Require the package with composer

composer require accord/mandrill-swiftmailer-bundle

Add AccordMandrillSwiftMailerBundle to application kernel

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Accord\MandrillSwiftMailerBundle\AccordMandrillSwiftMailerBundle(),
        // ...
    );
}

Add your API key to the config.yml

// app/config/config.yml
accord_mandrill_swift_mailer:
    api_key: MANDRILL_API_KEY
    async: false # optional
    subaccount: ~ # default null

Configure Swiftmailer to use this new transport

// app/config/config.yml
swiftmailer:
    transport: accord_mandrill

mandrillswiftmailerbundle's People

Contributors

danstefancu avatar e-weimann avatar gzankevich avatar jrattue avatar kyoushu avatar matth-- avatar remiii avatar verschoof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mandrillswiftmailerbundle's Issues

[enhancement] Add SwiftmailerBundle configuration bridge

As this bundle is dependent of Swiftmailer, it should be interesting to bridge its configuration through swiftmailer (in a bundle use), like:

swiftmailer:
    # ...
    mandrill:
        transport: accord_mandrill
        api_key: %mandrill_api_key%
        async: %mandrill_async%
        subaccount: %mandrill_async%

(Also rename transport to mandrill) @Rattler3

Possible valid API keys in test code

Even test API keys can be used to log in to a Mandrill account, which would grant someone full access to your account (including creating other live API keys, sending mail, changing login credentials, etc.). Recommend editing the values in the following files if the key in use is active (even if it's a test key):

  • Tests/Resources/config/bundle.yml line 2
  • Tests/BundleTest.php line 18

Please separate logic from framework wrapping

As this seems to be the most complete and maintained library for this functionally, I believe it would be helpful to separate the logic into a framework-agnostic library, which the Symfony2 bundle could depend on. For Symfony2, this will provide the same functionality because of Composer (the bundle can require the lib), while for every other framework the library now becomes available to use, without the (unneeded) Symfony2 wrapping.

Symfony 3.0 stable version

I've been trying the bundle in it's master branch with symfony 3.0 and it works as expected. May you release a stable version for the package at its current state?

Thank you!

Make Travis happy

Travis is not really happy because of the following error:

Mandrill_Invalid_Key: Invalid API key

If should be interesting to generate a test API key for Travis. Also, add tests for PHP 7.*. @Rattler3

[Insight] Source code should not contain TODO comments

in SwiftMailer/MandrillTransport.php, line 101

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

        $this->dispatcher->bindEventListener($plugin);
    } 

    /**
     * So far sends only basic html email
     * @todo attachments, images etc
     * 
     * https://mandrillapp.com/api/docs/messages.php.html#method-send
     * 
     * @param Swift_Mime_Message $message
     * @return array Mandrill Send Message

Posted from SensioLabsInsight

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.