PHP code example of madeinua / laravel-phpmailer

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

    

madeinua / laravel-phpmailer example snippets


'providers' => [
    ...
    // Illuminate\Mail\MailServiceProvider::class,
    LaravelPHPMailer\PHPMailerServiceProvider::class,
],

'mailers' => [
    ...
    'phpmailer' => [
        'transport' => 'phpmailer'
    ]
],

Mail::to($request->user())
    ->cc($moreUsers)
    ->bcc($evenMoreUsers)
    ->send(new OrderShipped($order));
bash
php artisan vendor:publish --provider="LaravelPHPMailer\PHPMailerServiceProvider" --tag="transporter-config"