New

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

hazzard/mail

Use Illuminate Mail outside Laravel.
2,430 3

Larablocks Analysis

hazzard/mail works with Laravel 5 (latest release 2.0.1, Aug 3, 2015), which reached end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5, past end of life
  • No release in the last 12 months (last: Aug 3, 2015)
  • 15 downloads a month (needs 10,000)
  • 3 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Aug 3, 2015.
  • No releases in the last 12 months.
  • First released: Jul 22, 2015.
  • Monthly downloads: 15, down 67% from six months ago.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 26, 2026.

Install
composer require hazzard/mail
Latest Version:2.0.1
PHP:>=5.4
Laravel:5
License:MIT
Last Updated:Aug 3, 2015
Links: GitHub  ·  Packagist
Maintainer: cretueusebiu

Illuminate Mail Outside Laravel

Installation

composer require illuminate/config

composer require illuminate/mail

composer require hazzard/mail

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

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.

Providing A Custom View Factory

To provide a custom view factory register a view binding to the container.

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

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

Related Packages

doctrine/dbal

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

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

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

465,816,364 607
nunomaduro/collision

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

431,187,642 4,660

Version History

Version Released PHP Laravel License
2.0.1 >=5.4 5.0.*|5.1.* MIT
2.0.0 >=5.4 5.0.*|5.1.* MIT
1.0.0 >=5.3