New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

timfeid/laravel-sendgrid

Add sendgrid api methods to Laravel's Mail
578 3
Install
composer require timfeid/laravel-sendgrid
Latest Version:3.0.0
Laravel:5
License:MIT
Last Updated:Apr 17, 2018
Links: GitHub  ·  Packagist
Maintainer: timfeid1

Laravel Sendgrid

Installation

config/app.php

    // Remove or comment out:
    // Illuminate\Mail\MailServiceProvider::class,
    // Add
    TimFeid\LaravelSendgrid\LaravelSendgridServiceProvider::class,

config/services.php

    'sendgrid' => [
        'api_key' => env('SENDGRID_API_KEY'),
    ],

.env

SENDGRID_API_KEY=[your_api_key]

Usage

    Mail::send('email.forgot-password', [], function ($mail) {
        // Added category functionality
        $mail->category('forgot-password');
        // Added custom arguments functionality
        $mail->uniqueArgs(['user_id' => 1]);

        // Default Laravel functionality
        $mail->to('email@address.com');
        $mail->subject('Crazy subject');
    });

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

651,963,193 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

407,699,310 4,663

Version History

Version Released Laravel License
3.0.0 ~5.5 MIT
2.0.0 ~5.5 MIT
1.0.5 ^5.3 MIT
1.0.4 ^5.3 MIT
1.0.3 ^5.3 MIT