PHP code example of distilleries / mailersaver

1. Go to this page and download the library: Download distilleries/mailersaver 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/ */

    

distilleries / mailersaver example snippets


    return [
        'template' => 'mailersaver::default',
        'override' => [
            'enabled' => env('MAILERSAVER_ENABLED', false),
            'to' => env('MAILERSAVER_TO', '[email protected],[email protected]'),
            'cc' => env('MAILERSAVER_CC', ''),
            'bcc' => env('MAILERSAVER_BCC', ''),
        ],
    ];

Mail::send('emails.welcome', ['key' => 'value'], function ($message) {
    $message->to('[email protected]', 'John Smith')->subject('Welcome!');
});
 php
    'aliases' => [
        // ...
       'Mail' => 'Distilleries\MailerSaver\Facades\Mail',
    ]
 php
    public function register()
	{
		$this->app->singleton('Distilleries\MailerSaver\Contracts\MailModelContract', function ($app) {
            return new App\Email;
        });

	}
ssh
php artisan vendor:publish --provider="Distilleries\MailerSaver\MailerSaverServiceProvider" --tag="models"
ssh
php artisan vendor:publish --provider="Distilleries\MailerSaver\MailerSaverServiceProvider" --tag="migrations"
ssh
php artisan vendor:publish --provider="Distilleries\MailerSaver\MailerSaverServiceProvider"
ssh
php artisan vendor:publish --provider="Distilleries\MailerSaver\MailerSaverServiceProvider" --tag="views"