2017 © Pedro Peláez
 

library mail

Use Illuminate Mail outside Laravel.

image

hazzard/mail

Use Illuminate Mail outside Laravel.

  • Monday, August 3, 2015
  • by cretueusebiu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 112 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 10 % Grown

The README.md

Illuminate Mail Outside Laravel

Installation

composer require illuminate/config, (*1)

composer require illuminate/mail, (*2)

composer require hazzard/mail, (*3)

composer require guzzlehttp/guzzle (required for Mailgun and Mandrill), (*4)

Usage

use Hazzard\Mail\Mail;
use Illuminate\Container\Container;
use Illuminate\Config\Repository as Config;

// Create a container and config repository.
$app = new Container;
$app['config'] = new Config;

// Set the mail & services configuration.
$app['config']['mail'] = require 'config/mail.php';
$app['config']['services'] = require 'config/services.php';

$mail = new Mail($container);

// Set the storage path used by the views.
$mail->setViewStoragePath(_DIR__.'/path/to/views');

// Make the instance available globally via static methods (optional).
$mail->setAsGlobal();

// Create a class alias (optional). 
$mail->classAlias();
Using The Mailer
Mail::send('emails.welcome', ['key' => 'value'], function ($message) {
    $message->to('foo@example.com', 'John Smith')->subject('Welcome!');
});

The rest is the same as Laravel., (*5)

Providing A Custom View Factory

To provide a custom view factory register a view binding to the container., (*6)

The view factory must implement Illuminate\Contracts\View\Factory and the view Illuminate\Contracts\View\View (or at least to have a render method)., (*7)

$container['view'] = new CustomViewFactory();

The Versions

03/08 2015

dev-master

9999999-dev

Use Illuminate Mail outside Laravel.

  Sources   Download

MIT

The Requires

 

03/08 2015

2.0.1

2.0.1.0

Use Illuminate Mail outside Laravel.

  Sources   Download

MIT

The Requires

 

03/08 2015

2.0.0

2.0.0.0

Use Illuminate Mail outside Laravel.

  Sources   Download

MIT

The Requires

 

22/07 2015

1.0.x-dev

1.0.9999999.9999999-dev

  Sources   Download

The Requires

 

22/07 2015

1.0.0

1.0.0.0

  Sources   Download

The Requires