Beautymail for Laravel 5
Beautymail is one of the best Laravel packages for sending responsive HTML emails!
Beautymail makes it super easy to send beatiful 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.
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:
Minty by Stamplia:
Sunny
Installation
Add the package to your composer.json by running:
composer require snowfire/beautymail dev-master
When it's installed, add it to the providers list in config/app.php
Snowfire\Beautymail\BeautymailServiceProvider::class,
Publish assets to your public folder
php artisan vendor:publish
Send your first Beauty mail
Add this to your routes.php
Route::get('/test', function()
{
$beautymail = app()->make(Snowfire\Beautymail\Beautymail::class);
$beautymail->send('emails.welcome', [], function($message)
{
$message
->from('[email protected]')
->to('[email protected]', 'John Smith')
->subject('Welcome!');
});
});
Now create resources/views/emails/welcome.blade.php
@extends('beautymail::templates.widgets')
@se
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.1 Laravel 5.2 Intermediate Packages