snowfire/beautymail
Beautymail is a Laravel package for sending beautiful, responsive HTML emails. It provides customizable Blade email templates and themes, inlines CSS automatically, and integrates smoothly with Laravel Mail for consistent transactional emails.
composer require snowfire/beautymail.php artisan vendor:publish --provider="Snowfire\Beautymail\BeautymailServiceProvider"
This drops config/beautymail.php and theme views under resources/views/vendor/beautymail/.Mail::send() with a themed send:
use Snowfire\Beautymail\Beautymail;
use Illuminate\Support\Facades\Mail;
Beautymail::send('emails.welcome', ['name' => $user->name], function ($message) use ($user) {
$message->to($user->email)->subject('Welcome!');
});
content section:
@extends('beautymail::layout')
@section('content')
<h1>Welcome, {{ $name }}</h1>
@stop
The shipped themes (default, muse, malihu) ship responsive, inline-styled tables around that content — that's the primary value. Look at config/beautymail.php first; it's where theme and branding live.Beautymail::send(...) for synchronous, Beautymail::queue(...); for background. Signatures mirror Mail::send/Mail::queue, so porting existing calls is mostly a find-and-replace.Mailable, wrap calls in a small helper or your own Mailable subclass that delegates to Beautymail::send() inside build(). Keeps the rest of your app on Laravel-native APIs.resources/views/vendor/beautymail/theme/default to a new folder, edit the Blade/CSS, then set 'theme' => 'mytheme' in config/beautymail.php. Avoid editing vendor views.resources/views/emails/base.blade.php extending beautymail::layout, define reusable @section('header')/@section('intro') bits, then have each email extend that instead of the package layout directly.asset(), so set APP_URL correctly per environment.Mail/queue infrastructure, Mail::fake() / Queue::fake() assertions usually still apply — but verify against your version.APP_URL is load-bearing. If APP_URL is http://localhost, every email logo/image will be broken in real clients. Set it per environment.file:// or localhost references. Always host assets publicly.resources/views/vendor/beautymail/theme/. A typo in config('beautymail.theme') produces cryptic Blade "view not found" errors, not a theme error.Beautymail::send with Mail::send. They share a facade-ish feel, but only Beautymail applies the layout — if you accidentally leave a Mail::send() in a notification path you'll get unstyled mail.beautymail::layout) in your published views or extend it — don't try to subclass the mailer.How can I help you explore Laravel packages today?