2017 © Pedro Peláez
 

library beautymail

Send beautiful html emails with Laravel

image

desmond/beautymail

Send beautiful html emails with Laravel

  • Tuesday, October 27, 2015
  • by kingdido999
  • Repository
  • 1 Watchers
  • 4 Stars
  • 25 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 101 Forks
  • 0 Open issues
  • 9 Versions
  • 9 % Grown

The README.md

Beautymail for Laravel 5

Beautymail makes it super easy to send beatiful responsive HTML emails. It's made for things like:, (*1)

  • Welcome emails
  • Password reminders
  • Invoices
  • Data exports

If you're on Laravel 4, use the 1.x branch., (*2)

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., (*3)

Widgets by Campaign Monitor:, (*4)

Widget Template, (*5)

Minty by Stamplia:, (*6)

Widget Template, (*7)

Sunny, (*8)

Widget Template, (*9)

Installation

Add the package to your composer.json by running:, (*10)

composer require snowfire/beautymail dev-master

When it's installed, add it to the providers list in config/app.php, (*11)

Snowfire\Beautymail\BeautymailServiceProvider::class,

Publish assets to your public folder, (*12)

php artisan vendor:publish

Send your first Beauty mail

Add this to your routes.php, (*13)

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, (*14)

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

@section('content')

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

        <h4 class="secondary"><strong>Hello World</strong></h4>
        <p>This is a test</p>

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


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

        <h4 class="secondary"><strong>Hello World again</strong></h4>
        <p>This is another test</p>

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

@stop

That's it!, (*15)

Options

Template: Widgets

To change colours for the different segments, pass a colour variable:, (*16)

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

Minty template example

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

@section('content')

    @include('beautymail::templates.minty.contentStart')
        <tr>
            <td class="title">
                Welcome Steve
            </td>
        </tr>
        <tr>
            <td width="100%" height="10"></td>
        </tr>
        <tr>
            <td class="paragraph">
                This is a paragraph text
            </td>
        </tr>
        <tr>
            <td width="100%" height="25"></td>
        </tr>
        <tr>
            <td class="title">
                This is a heading
            </td>
        </tr>
        <tr>
            <td width="100%" height="10"></td>
        </tr>
        <tr>
            <td class="paragraph">
                More paragraph text.
            </td>
        </tr>
        <tr>
            <td width="100%" height="25"></td>
        </tr>
        <tr>
            <td>
                @include('beautymail::templates.minty.button', ['text' => 'Sign in', 'link' => '#'])
            </td>
        </tr>
        <tr>
            <td width="100%" height="25"></td>
        </tr>
    @include('beautymail::templates.minty.contentEnd')

@stop

Ark template example

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

@section('content')

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

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

        <h4 class="secondary"><strong>Hello World</strong></h4>
        <p>This is a test</p>

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

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

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

        <h4 class="secondary"><strong>Hello World again</strong></h4>
        <p>This is another test</p>

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

@stop

Sunny template example

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

@section('content')

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

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

        <p>Today will be a great day!</p>

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

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

@stop

The Versions

27/10 2015

dev-master

9999999-dev

Send beautiful html emails with Laravel

  Sources   Download

MIT

The Requires

 

laravel email html

07/07 2015

1.x-dev

1.9999999.9999999.9999999-dev

Send beautiful html emails with Laravel

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

laravel email html

09/02 2015

v1.0.6

1.0.6.0

Send beautiful html emails with Laravel

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

laravel email html

10/09 2014

v1.0.5

1.0.5.0

Send beautiful html emails with Laravel

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

laravel email html

13/08 2014

v1.0.4

1.0.4.0

Send beautiful html emails with Laravel

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

laravel email html

27/07 2014

v1.0.3

1.0.3.0

Send beautiful html emails with Laravel

  Sources   Download

MIT

The Requires

 

by Emil Sundberg

laravel email html

27/07 2014

v1.0.2

1.0.2.0

  Sources   Download

The Requires

 

by Emil Sundberg

27/07 2014

v1.0.1

1.0.1.0

  Sources   Download

The Requires

 

by Emil Sundberg

27/07 2014

v1.0.0

1.0.0.0

  Sources   Download

The Requires

 

by Emil Sundberg