PHPackages                             moirei/custom-email-sender - 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. moirei/custom-email-sender

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

moirei/custom-email-sender
==========================

A tool for Laravel's Nova administrator panel that allows you to send custom email messages that within your application that leverages the applications existing settings and configurations.

v1.2.0(6y ago)061MITVuePHP &gt;=7.1.0

Since Feb 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/augustusnaz/nova-custom-email-sender)[ Packagist](https://packagist.org/packages/moirei/custom-email-sender)[ Docs](https://github.com/dniccum/nova-custom-email-sender)[ RSS](/packages/moirei-custom-email-sender/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (11)Used By (0)

Custom Email Sender for Laravel Nova
====================================

[](#custom-email-sender-for-laravel-nova)

[![Latest Version on Packagist](https://camo.githubusercontent.com/97be6fccbdc8ff2f0f4a3e4c552e4d78c515f0706e6d401d06783889039a3348/68747470733a2f2f706f7365722e707567782e6f72672f646e696363756d2f637573746f6d2d656d61696c2d73656e6465722f762f737461626c653f666f726d61743d666c61742d73717561726526636f6c6f723d23304537464330)](https://packagist.org/packages/dniccum/custom-email-sender)[![License](https://camo.githubusercontent.com/5c3195b8c1658c0554f6abbbc9e03762afa6ccfe8aca8b19887c603d1f7bfd43/68747470733a2f2f706f7365722e707567782e6f72672f646e696363756d2f637573746f6d2d656d61696c2d73656e6465722f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/dniccum/custom-email-sender)[![Total Downloads](https://camo.githubusercontent.com/37467732e76aa40a067d0309386312a3825dc320ee0307b08f373ee22bf5840a/68747470733a2f2f706f7365722e707567782e6f72672f646e696363756d2f637573746f6d2d656d61696c2d73656e6465722f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/dniccum/custom-email-sender)

This is a tool for Laravel's Nova administrator panel that allows you to send custom email messages that within your application that leverages the applications existing settings and configurations; from address, email driver, etc.

[![Screenshot](https://raw.githubusercontent.com/dniccum/nova-custom-email-sender/master/screenshots/screenshot-1.png)](https://raw.githubusercontent.com/dniccum/nova-custom-email-sender/master/screenshots/screenshot-1.png)

Features
--------

[](#features)

- Inherits your Laravel application's notification Blade layout with any and all modifications and customizations.
    - Existing email template can be published to the `views/vendor` directory
    - Allows you to provide a custom Blade template (with the appropriate variables applied)
- Provides three methods of sending messages:
    - Search the provided model by name and email
    - Via ad-hoc email input with email address validation
    - A simple toggle to send the message to all of your users
- Leverages the [Quill](https://quilljs.com/docs) WYSIWYG editor with the ability to customize the available buttons/functionality for your users
- Upload a basic HTML file to pre-populate the content for your message
- Language localization
- Preview the message before it's sent
- Various settings to adjust this tool to your installation

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require dniccum/custom-email-sender

```

You will then need to publish the package's configuration and blade view files to your applications installation:

```
php artisan vendor:publish --provider="Dniccum\CustomEmailSender\ToolServiceProvider"

```

If you would only like to publish a portion of the vendor assets, you may use the following tags:

- config
- views
- lang

with the necessary artisan command like so:

```
php artisan vendor:publish --provider="Dniccum\CustomEmailSender\ToolServiceProvider" --tag=config

```

Inside `App\Providers\NovaServiceProvider`update the tools function. This will include the link on the sidebar.

```
use Dniccum\CustomEmailSender\CustomEmailSender;

...

public function tools()
{
    return [new CustomEmailSender()];
}

```

Upgrade from version 1.X
------------------------

[](#upgrade-from-version-1x)

If you are upgrading from version 1.X **AND** you have modified the tool's default configuration, some please note the changes made to the 'from' property and update your configuration file accordingly.

### Send From settings

[](#send-from-settings)

Below the is the "out-of-the-box" configuration for the 'from' setting:

```
'from' => [
    'default' => config('mail.from.address'),
    'options' => [
        [
            'address' => config('mail.from.address'),
            'name' => config('mail.from.name'),
        ]
    ],
],
```

If you have a custom from address and name, add them as an associative array to the 'options' array, and indicate the default as you see fit.

### Models

[](#models)

You can now send emails to multiple models instead of singular model like before.

```
'model' => [
    'classes' => [
        \App\User::class,
    ],
]
```

1. The 'class' value within the 'model' configuration is no longer used.
2. A new 'classes' value has taken it's place and accepts an array of Eloquent model classes to be passed to it.

Configuration
-------------

[](#configuration)

The configuration items listed below can be found in the `novaemailsender.php` configuration file.

### Example

[](#example)

```
