hazzard/mail
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 advisedNot 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 |
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
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 2.0.1 | >=5.4 | 5.0.*| | MIT | |
| 2.0.0 | >=5.4 | 5.0.*| | MIT | |
| 1.0.0 | >=5.3 |