PHP code example of moirei / custom-email-sender

1. Go to this page and download the library: Download moirei/custom-email-sender library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

moirei / custom-email-sender example snippets


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

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



return [

    /*
    |--------------------------------------------------------------------------
    | Mail Driver
    |--------------------------------------------------------------------------
    |
    | The mail driver with which the message will be sent with.
    |
    */

    'provider' => config('mail.driver'),

    /*
    |--------------------------------------------------------------------------
    | Priority
    |--------------------------------------------------------------------------
    |
    | The priority in which the emails sent will be added to the queue driver.
    | In order to take advantage of this feature, you must specify queue
    | priority in your worker like so: php artisan queue:work --queue=high,low
    |
    */

    'priority' => 'low',

    /*
    |--------------------------------------------------------------------------
    | Mail Driver options
    |--------------------------------------------------------------------------
    |
    | The name and associated email address options from which the message will be sent.
    |
    */

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

    /*
    |--------------------------------------------------------------------------
    | Default User Model
    |--------------------------------------------------------------------------
    |
    | To use the "send all" feature, define the model class and the accompanying
    | properties to populate the message with.
    |
    */

    'model' => [
        'classes' => [
            \App\User::class,
        ],
        'email' => 'email',
        'name' => null,
        'first_name' => 'first_name',
        'last_name' => 'last_name',
    ],

    /*
    |--------------------------------------------------------------------------
    | Email Template
    |--------------------------------------------------------------------------
    |
    | The Blade template used to send the email and if the mailable should parse
    | it as markdown. By default this template utilizes the existing notification
    | layout template. So any modifications that you have made to this layout
    | template (like the header, colors, etc) will be inherited by the view
    | supplied by this package.
    |
    | IMPORTANT: If you decide to supply your own Blade template, make sure that
    | it 

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

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

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