PHPackages                             rpsimao/beautymail - 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. rpsimao/beautymail

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

rpsimao/beautymail
==================

Send beautiful html emails with Laravel

v1.2.6(2y ago)0150MITBladePHP &gt;=5.4.0

Since Jul 27Pushed 2y agoCompare

[ Source](https://github.com/rpsimao/Beautymail)[ Packagist](https://packagist.org/packages/rpsimao/beautymail)[ RSS](/packages/rpsimao-beautymail/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (2)Versions (29)Used By (0)

Beautymail for Laravel
======================

[](#beautymail-for-laravel)

Beautymail makes it super easy to send beautiful responsive HTML emails. It's made for things like:

- Welcome emails
- Password reminders
- Invoices
- Data exports

If you're on Laravel 4, use the `1.x` branch.

### Index:

[](#index)

- [Templates](#templates)
- [Installation](#installation)
- [Send your first Beauty mail](#send-your-first-beauty-mail)
- [Options](#options)
- [Lumen support](#lumen-support)

Templates
---------

[](#templates)

There are tons of great looking HTML email templates out there. Campaign Monitor and Mailchimp has released hundreds for free. It is pretty simple to adapt a template to Beautymail. If you do, please send a PR.

**Widgets** by [Campaign Monitor](https://www.campaignmonitor.com/templates/all/):

[![Widget Template](screenshots/widgets.png?raw=true "Widgets template")](screenshots/widgets.png?raw=true)

**Minty** by **Stamplia**:

[![Widget Template](screenshots/minty.png?raw=true "Widgets template")](screenshots/minty.png?raw=true)

**Sunny**

[![Widget Template](screenshots/sunny.png?raw=true "Sunny template")](screenshots/sunny.png?raw=true)

Installation
------------

[](#installation)

Add the package to your `composer.json` by running:

```
composer require snowfire/beautymail

```

When it's installed, publish assets to your public folder

```
php artisan vendor:publish --provider="Snowfire\Beautymail\BeautymailServiceProvider"

```

Configure your settings such as logo url and social links in `config/beautymail.php`

Send your first Beauty mail
---------------------------

[](#send-your-first-beauty-mail)

Add this to your `routes/web.php`

```
Route::get('/test', function()
{
	$beautymail = app()->make(Snowfire\Beautymail\Beautymail::class);
	$beautymail->send('emails.welcome', [], function($message)
	{
		$message
			->from('bar@example.com')
			->to('foo@example.com', 'John Smith')
			->subject('Welcome!');
	});

});
```

Now create `resources/views/emails/welcome.blade.php`

```
@extends('beautymail::templates.widgets')

@section('content')

	@include('beautymail::templates.widgets.articleStart')

		Hello World
		This is a test

	@include('beautymail::templates.widgets.articleEnd')

	@include('beautymail::templates.widgets.newfeatureStart')

		Hello World again
		This is another test

	@include('beautymail::templates.widgets.newfeatureEnd')

@stop
```

That's it!

Options
-------

[](#options)

### *Template:* Widgets

[](#template-widgets)

To change colours for the different segments, pass a colour variable:

```
@include('beautymail::templates.widgets.articleStart', ['color' => '#0000FF'])
```

#### Minty template example

[](#minty-template-example)

```
@extends('beautymail::templates.minty')

@section('content')

	@include('beautymail::templates.minty.contentStart')

				Welcome Steve

				This is a paragraph text

				This is a heading

				More paragraph text.

				@include('beautymail::templates.minty.button', ['text' => 'Sign in', 'link' => '#'])

	@include('beautymail::templates.minty.contentEnd')

@stop
```

### Ark template example

[](#ark-template-example)

```
@extends('beautymail::templates.ark')

@section('content')

    @include('beautymail::templates.ark.heading', [
		'heading' => 'Hello World!',
		'level' => 'h1'
	])

    @include('beautymail::templates.ark.contentStart')

        Hello World
        This is a test

    @include('beautymail::templates.ark.contentEnd')

    @include('beautymail::templates.ark.heading', [
		'heading' => 'Another headline',
		'level' => 'h2'
	])

    @include('beautymail::templates.ark.contentStart')

        Hello World again
        This is another test

    @include('beautymail::templates.ark.contentEnd')

@stop
```

#### Sunny template example

[](#sunny-template-example)

```
@extends('beautymail::templates.sunny')

@section('content')

    @include ('beautymail::templates.sunny.heading' , [
        'heading' => 'Hello!',
        'level' => 'h1',
    ])

    @include('beautymail::templates.sunny.contentStart')

        Today will be a great day!

    @include('beautymail::templates.sunny.contentEnd')

    @include('beautymail::templates.sunny.button', [
        	'title' => 'Click me',
        	'link' => 'http://google.com'
    ])

@stop
```

Lumen support
-------------

[](#lumen-support)

In order to get this working on Lumen follow the installation instructions except for the `artisan vendor:publish` command, since Lumen does not provide this command. Instead you have to copy the assets folder from `vendor/rpsimao/beautymail/public/` to the public folder in your Lumen project manually.

Make sure to also put the `beautymail.php` config file in the `config` folder (default available in `src/config/settings.php`)

### Enable mailing in Lumen

[](#enable-mailing-in-lumen)

After this you will need to install and configure `illuminate/mailer` with:

```
composer require illuminate/mail

```

and add this to your `bootstrap/app.php`:

```
$app->withFacades();
$app->register(App\Providers\AppServiceProvider::class);

```

See [this blog post](https://medium.com/@edwardsteven/using-lumen-and-laravel-mail-with-mailgun-270415daed37) for more details and how to use different mail libraries in lumen:

### Configure Beautymail classes and configuration parameters

[](#configure-beautymail-classes-and-configuration-parameters)

In order to get Beautymail working on Lumen you need to add the following to your `bootstrap/app.php` in order to resolve missing config files, parameters and classes (before you register `BeautymailServiceProvider`):

```
// Provide required path variables
$app->instance('path.config', env("STORAGE_DIR", app()->basePath()) . DIRECTORY_SEPARATOR . 'config');
$app->instance('path.public', env("STORAGE_DIR", app()->basePath()) . DIRECTORY_SEPARATOR . 'public');

// Enable config for beautymail
$app->configure('beautymail');

// Provide class alliases to resolve Request and Config
class_alias(\Illuminate\Support\Facades\Request::class, "\Request");
class_alias(\Illuminate\Support\Facades\Config::class, "\Config");

```

### Start using Beautymail

[](#start-using-beautymail)

Congratulations, you can know start using bBautmail in Lumen. See: [Send your first Beauty mail](#send-your-first-beauty-mail) on what to do next.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 64.5% 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 ~135 days

Recently: every ~189 days

Total

27

Last Release

787d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b20557c62a96fca9a58d80b11dffbaf4e3debd77d9358c66ed06d413c1e884a7?d=identicon)[rpsimao](/maintainers/rpsimao)

---

Top Contributors

[![emilsundberg](https://avatars.githubusercontent.com/u/215958?v=4)](https://github.com/emilsundberg "emilsundberg (69 commits)")[![rpsimao](https://avatars.githubusercontent.com/u/205846?v=4)](https://github.com/rpsimao "rpsimao (5 commits)")[![joshuadegier](https://avatars.githubusercontent.com/u/2580917?v=4)](https://github.com/joshuadegier "joshuadegier (5 commits)")[![phroggyy](https://avatars.githubusercontent.com/u/7256451?v=4)](https://github.com/phroggyy "phroggyy (3 commits)")[![Znarkus](https://avatars.githubusercontent.com/u/168042?v=4)](https://github.com/Znarkus "Znarkus (2 commits)")[![denis-chmel](https://avatars.githubusercontent.com/u/331627?v=4)](https://github.com/denis-chmel "denis-chmel (2 commits)")[![jamesmills](https://avatars.githubusercontent.com/u/557096?v=4)](https://github.com/jamesmills "jamesmills (2 commits)")[![danielsdeboer](https://avatars.githubusercontent.com/u/13170241?v=4)](https://github.com/danielsdeboer "danielsdeboer (1 commits)")[![feripratama](https://avatars.githubusercontent.com/u/32523275?v=4)](https://github.com/feripratama "feripratama (1 commits)")[![alariva](https://avatars.githubusercontent.com/u/3021314?v=4)](https://github.com/alariva "alariva (1 commits)")[![codesmithtech](https://avatars.githubusercontent.com/u/26115835?v=4)](https://github.com/codesmithtech "codesmithtech (1 commits)")[![mikepsinn](https://avatars.githubusercontent.com/u/2808553?v=4)](https://github.com/mikepsinn "mikepsinn (1 commits)")[![Neries](https://avatars.githubusercontent.com/u/37634670?v=4)](https://github.com/Neries "Neries (1 commits)")[![buzkall](https://avatars.githubusercontent.com/u/5702?v=4)](https://github.com/buzkall "buzkall (1 commits)")[![primeinc](https://avatars.githubusercontent.com/u/4395149?v=4)](https://github.com/primeinc "primeinc (1 commits)")[![rickytribbia](https://avatars.githubusercontent.com/u/1375266?v=4)](https://github.com/rickytribbia "rickytribbia (1 commits)")[![andysoa](https://avatars.githubusercontent.com/u/3053002?v=4)](https://github.com/andysoa "andysoa (1 commits)")[![sh4d0wb0y](https://avatars.githubusercontent.com/u/28193209?v=4)](https://github.com/sh4d0wb0y "sh4d0wb0y (1 commits)")[![shiroamada](https://avatars.githubusercontent.com/u/2062946?v=4)](https://github.com/shiroamada "shiroamada (1 commits)")[![simonfranz](https://avatars.githubusercontent.com/u/1003559?v=4)](https://github.com/simonfranz "simonfranz (1 commits)")

---

Tags

laravelemailhtml

### Embed Badge

![Health badge](/badges/rpsimao-beautymail/health.svg)

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

###  Alternatives

[snowfire/beautymail

Send beautiful html emails with Laravel

1.3k733.1k2](/packages/snowfire-beautymail)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[osiemsiedem/laravel-autolink

A Laravel package for converting URLs in a given string of text into clickable links.

13126.3k](/packages/osiemsiedem-laravel-autolink)

PHPackages © 2026

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