2017 © Pedro Peláez
 

library larajet

Laravel Mail Transport for Mailjet

image

robrogers/larajet

Laravel Mail Transport for Mailjet

  • Friday, May 25, 2018
  • by robrogers3
  • Repository
  • 1 Watchers
  • 4 Stars
  • 88 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 14 % Grown

The README.md

Larajet

Package version ![Software License][ico-license] Total downloads, (*1)

Larajet is a mail transport for Laravel. It is a MailJet integration package. Much like Mailgun, this allows for sending Mail via the mailjet api (based on Mailjet API v3.) It supports Mailables and Notifables., (*2)

Install

Via Composer, (*3)

``` bash $ composer require robrogers/larajet, (*4)


## Configure You will need to update app.php in the config directory: In Package Service Providers section add:

Larajet\MailjetServiceProvider::class, (*5)


Also, add this line to the 'aliases' array

'MailJet' => Larajet\Facades\MailJet::class,, (*6)


Then you need to update config/services.php. Add this under Third Party Services: ``` php 'mailjet' => [ 'public_key' => env('MAILJET_PUBLIC_KEY'), 'private_key' => env('MAILJET_PRIVATE_KEY'), 'from' => env('MAIL_FROM'), 'driver' => env('MAIL_DRIVER'), 'guzzle' => [], 'api_url' => 'https://api.mailjet.com/v3/send' ],

Lasty, you will need to update your .env file accordingly to set your MailJet Public and Private keys., (*7)

MAILJET_PUBLIC_KEY=YOUR_PUBLIC_KEY
MAILJET_PRIVATE_KEY=YOUR_PRIVATE_KEY

Usage

The best way is to create a Mailable. e.g., (*8)

``` bash php artisan make:mail TestMail, (*9)


Then just mail it! ``` php use App\Mail\TestMail; Mail::to(fred@example.com) ->subject('Test Mail') ->send(new TestMail);

Learn about Mailables on laravel.com, (*10)

Change log

Please see CHANGELOG for more information what has changed recently., (*11)

Testing

``` bash $ composer test, (*12)

There is only one test. It tests the mail was sent.

Basically the steps are:
* Call a console command, or hit a route that sends an email.
* There are no more steps.

A route might look like:
``` php
use App\Mail\TestMail;

Route::get('/sendmail', function() {
    Mail::to(\App\User::first()->email)
        ->send(new TestMail);
    return 'sent?';
});

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*13)

Security

If you discover any security related issues, please email robrogers@me.com instead of using the issue tracker., (*14)

Credits

License

The MIT License (MIT). Please see License File for more information., (*15)

The Versions

25/05 2018

dev-master

9999999-dev https://github.com/robrogers3/larajet

Laravel Mail Transport for Mailjet

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel mail mailjet mail driver

24/05 2018

1.0.2

1.0.2.0 https://github.com/robrogers3/larajet

Laravel Mail Transport for Mailjet

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel mail mailjet mail driver

12/02 2017
15/11 2016

1.0

1.0.0.0 https://github.com/robrogers3/larajet

Laravel Mail Transport for Mailjet

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel mail mailjet mail driver