PHP code example of fabiotech / laravel-elasticemail

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

    

fabiotech / laravel-elasticemail example snippets


use Illuminate\Support\Facades\Mail;

Mail::to('[email protected]')
    ->cc('[email protected]')
    ->bcc('[email protected]')
    ->send(new InvoiceMail($invoice));

'elasticemail' => [
    'transport' => 'elasticemail',
    'key' => env('ELASTIC_EMAIL_API_KEY'),
    'connect_timeout' => 5,
    'timeout' => 15,
    'max_body_bytes' => 2_000_000,
    'max_attachments' => 10,
    'max_attachment_bytes' => 10_000_000,
    'max_message_bytes' => 15_000_000,
    'max_payload_bytes' => 20_000_000,
    'max_recipients' => 1_000,
    'max_header_bytes' => 16_384,
    'max_metadata_bytes' => 262_144,
    'max_response_bytes' => 65_536,
],
bash
php artisan vendor:publish --tag=elasticemail-config
php artisan config:cache