PHPackages                             m4rc377/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. m4rc377/mail

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

m4rc377/mail
============

Use Illuminate Mail outside Laravel.

v1.0.0(5y ago)02MITPHPPHP ^7.3

Since Sep 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/m4rc377/mail)[ Packagist](https://packagist.org/packages/m4rc377/mail)[ RSS](/packages/m4rc377-mail/feed)WikiDiscussions master Synced 3w ago

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

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

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

This is fork from [hazzardweb/mail](https://github.com/hazzardweb/mail).

### Installation

[](#installation)

`composer require m4rc377/mail`

### Usage

[](#usage)

```
use m4rc377\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

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2112d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b36c6b1ac4c16a7052beb736366af83e3c1498d6bcf11321a212c3d19584510?d=identicon)[m4rc377](/maintainers/m4rc377)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M129](/packages/roots-acorn)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[s-ichikawa/laravel-sendgrid-driver

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

4079.9M1](/packages/s-ichikawa-laravel-sendgrid-driver)

PHPackages © 2026

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