PHPackages                             hazzard/mail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. hazzard/mail

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

hazzard/mail
============

Use Illuminate Mail outside Laravel.

2.0.1(10y ago)32.1k↓50%2[1 issues](https://github.com/hazzardweb/mail/issues)MITPHPPHP &gt;=5.4

Since Jul 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/hazzardweb/mail)[ Packagist](https://packagist.org/packages/hazzard/mail)[ RSS](/packages/hazzard-mail/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

Illuminate Mail Outside Laravel
-------------------------------

[](#illuminate-mail-outside-laravel)

### Installation

[](#installation)

`composer require illuminate/config`

`composer require illuminate/mail`

`composer require hazzard/mail`

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

### Usage

[](#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

[](#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](http://laravel.com/docs/5.0/mail#basic-usage).

##### Providing A Custom View Factory

[](#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();

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

4

Last Release

3941d ago

Major Versions

1.0.x-dev → 2.0.02015-08-03

PHP version history (2 changes)1.0.0PHP &gt;=5.3

2.0.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/43c2999e83614acd2ad1b9df54d88807b2cf723814d5af019084fe5884fa7930?d=identicon)[cretueusebiu](/maintainers/cretueusebiu)

---

Top Contributors

[![cretueusebiu](https://avatars.githubusercontent.com/u/1517945?v=4)](https://github.com/cretueusebiu "cretueusebiu (4 commits)")

### Embed Badge

![Health badge](/badges/hazzard-mail/health.svg)

```
[![Health](https://phpackages.com/badges/hazzard-mail/health.svg)](https://phpackages.com/packages/hazzard-mail)
```

###  Alternatives

[fedeisas/laravel-mail-css-inliner

Inline the CSS of your HTML emails using Laravel

5974.6M3](/packages/fedeisas-laravel-mail-css-inliner)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)[squareboat/sneaker

An easy way to send emails with stack trace whenever an exception occurs on the server for Laravel Applications.

220191.2k](/packages/squareboat-sneaker)[illuminate/notifications

The Illuminate Notifications package.

483.0M967](/packages/illuminate-notifications)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
