Code Monkey home page Code Monkey logo

sparkpost-laravel-driver's Introduction

Install

Require this package with composer using the following command:

composer require clarification/sparkpost-laravel-driver

After updating composer, add the service provider to the providers array in config/app.php

Clarification\MailDrivers\Sparkpost\SparkpostServiceProvider::class,

You will also need to add the sparkpost API Key settings to the array in config/services.php and set up the environment key

'sparkpost' => [
    'secret' => env('SPARKPOST_SECRET'),
],
SPARKPOST_SECRET=__Your_key_here__

Finally you need to set your mail driver to sparkpost. You can do this by changing the driver in config/mail.php

'driver' => env('MAIL_DRIVER', 'sparkpost'),

Or by setting the environment variable MAIL_DRIVER in your .env file

MAIL_DRIVER=sparkpost

If you need to pass any options to the guzzle client instance which is making the request to the sparkpost API, you can do so by setting the 'guzzle' options in config/services.php

'sparkpost' => [
    'secret' => env('SPARKPOST_SECRET'),
    'guzzle' => [
        'verify' => true,
        'decode_content' => true,
    ]
],

This is only needed if you are using Laravel 5.1. or older, the sparkpost driver is included in 5.2* If the Laravel Sparkpost driver is present (you are running >=5.2), The service provider will not load this packages Sparkpost driver.

sparkpost-laravel-driver's People

Contributors

bbredewold avatar lidbetter avatar sebastiandedeyne avatar

Watchers

 avatar

Forkers

intothesource

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.