andrefigueira/laramailer

A simple mailing package using Laravel Mail and Blade for sending emails with an expressive syntax, and also the ability to store emails in a database for future viewing
66 2
Install
composer require andrefigueira/laramailer
Latest Version:1.0.6
License:MIT
Last Updated:May 6, 2017
Links: GitHub  ·  Packagist
Maintainer: andre

laramailer

A re-usable mailer component, which can send emails, and also store them for later use

Installation

composer require andrefigueira\laramailer

Setup

Service provider

Add the LaramailerServiceProvider to your config/app.php

Laramailer\Providers\LaramailerServiceProvider::class

Add the Uuid class as an alias in your config/app.php

'Uuid'      => Rhumsaa\Uuid\Uuid::class,

Migrations and views publish

Run php artisan vendor:publish to copy the views and migrations

Database table

Run php artisan migrate to install the emails table

Add the config variables to your env file

MAIL_NOREPLY=noreply@email.com
MAIL_NOREPLY_NAME=ServiceName

Mail setup

Be sure to configure your mail driver too! I recommend mailgun

Usage

use Laramailer\Utility\Mailer;

$mailer = new Mailer();

$mailer
    ->template('andrefigueira.laramailer.emails.default')
    ->to('andre@email.com')
    ->subject('Hey Andre!)
    ->with([
        'foo' => 'bar',
    ])
    ->send()
;

Related Packages

spatie/laravel-google-fonts

Manage self-hosted Google Fonts in Laravel apps

1,341,153 494
tightenco/jigsaw

Simple static sites with Laravel's Blade.

466,017 2,251
roquie/laravel-dusk-select2

Select2.js support for the Laravel Dusk testing.

366,722 41
haruncpi/laravel-log-reader

A simple and beautiful laravel log reader

351,743 380
laravel-frontend-presets/argon

Laravel 9.x Front-end preset for argon

258,759 233