PHP code example of mahrdanial / shwanix-mailer

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

    

mahrdanial / shwanix-mailer example snippets


'mailers' => [
    // ...
    'shwanix' => [
        'transport' => 'shwanix',
    ],
],

'default' => env('MAIL_MAILER', 'shwanix'),

use Illuminate\Support\Facades\Mail;

Mail::raw('Hello from Shwanix.', function ($message) {
    $message->to('[email protected]')
        ->subject('Test');
});

Mail::send('emails.welcome', $data, function ($message) {
    $message->to(['[email protected]', '[email protected]'])
        ->cc('[email protected]')
        ->subject('Welcome');
});

Mail::mailer('shwanix')->send(...);
bash
php artisan vendor:publish --tag=shwanix-mailer-config