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

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

snowfire/beautymail
===================

Send beautiful html emails with Laravel

v1.1.9(1y ago)1.3k733.1k↓16.4%2082MITBladePHP &gt;=7.0.0

Since Jul 27Pushed 1y ago29 watchersCompare

[ Source](https://github.com/Snowfire/Beautymail)[ Packagist](https://packagist.org/packages/snowfire/beautymail)[ RSS](/packages/snowfire-beautymail/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (26)Used By (2)

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

### 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.

**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
```

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/snowfire/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 Beautymail in Lumen. See: [Send your first Beauty mail](#send-your-first-beauty-mail) on what to do next.

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance44

Moderate activity, may be stable

Popularity63

Solid adoption and visibility

Community37

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 66.4% 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 ~168 days

Recently: every ~348 days

Total

24

Last Release

439d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.1.8PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4513288839d184d222046f71ee9e2e29ad676e4da76329151b517939bf1b5139?d=identicon)[emilsundberg](/maintainers/emilsundberg)

---

Top Contributors

[![emilsundberg](https://avatars.githubusercontent.com/u/215958?v=4)](https://github.com/emilsundberg "emilsundberg (75 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)")[![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)")[![Znarkus](https://avatars.githubusercontent.com/u/168042?v=4)](https://github.com/Znarkus "Znarkus (2 commits)")[![danielsdeboer](https://avatars.githubusercontent.com/u/13170241?v=4)](https://github.com/danielsdeboer "danielsdeboer (1 commits)")[![DuckThom](https://avatars.githubusercontent.com/u/6512901?v=4)](https://github.com/DuckThom "DuckThom (1 commits)")[![feripratama](https://avatars.githubusercontent.com/u/32523275?v=4)](https://github.com/feripratama "feripratama (1 commits)")[![JaZo](https://avatars.githubusercontent.com/u/3475007?v=4)](https://github.com/JaZo "JaZo (1 commits)")[![justkidding96](https://avatars.githubusercontent.com/u/1297850?v=4)](https://github.com/justkidding96 "justkidding96 (1 commits)")[![alariva](https://avatars.githubusercontent.com/u/3021314?v=4)](https://github.com/alariva "alariva (1 commits)")[![Neries](https://avatars.githubusercontent.com/u/37634670?v=4)](https://github.com/Neries "Neries (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)")[![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)")[![sten](https://avatars.githubusercontent.com/u/180665?v=4)](https://github.com/sten "sten (1 commits)")[![svenhakvoort](https://avatars.githubusercontent.com/u/29797871?v=4)](https://github.com/svenhakvoort "svenhakvoort (1 commits)")

---

Tags

beautiful-html-emailsemaillaravellaravelemailhtml

### Embed Badge

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

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

###  Alternatives

[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)
