PHP code example of elite50 / e50-mail-laravel

1. Go to this page and download the library: Download elite50/e50-mail-laravel 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/ */

    

elite50 / e50-mail-laravel example snippets


'providers' => array (
    ...
    'Elite50\E50MailLaravel\E50MailServiceProvider',
),

'aliases' => array (
    ...
    'E50Mail' => 'Elite50\E50MailLaravel\Facades\E50Mail',
    'E50MailWorker' => 'Elite50\E50MailLaravel\E50MailWorker',
)

E50Mail::queue(
    // Sender domain (['html' => 'views.html-email'],

    // View data
    ['name' => 'John Doe'],

    // Message data
    [
        'toEmail' => '[email protected]',
        'toName' => 'John Doe',
        'fromEmail' => '[email protected]',
        'fromName' => 'Mail Robot',
        'subject' => 'Action Required!',
        'headers' => [
            'X-Mail-Header' => 'abcd1234',
        ],
    ],

    // Custom driver (DEPRECATED - use custom mail config)
    'mailgun',

    // Custom queue
    'QueueName',

    // Custom mail config
    [
        'driver' => 'smtp',
        'host' => 'smtp.myhost.com',
    ]
);